Skip to content

Commit

Permalink
refactor: Update field names and values in ForkChoice and ForkChoiceNode
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Aug 22, 2023
1 parent 1f5dfaf commit 1c0a89f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/proto/eth/v1/fork_choice.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func (f *ForkChoice) AsGoEth2ClientV1ForkChoice() (*eth2v1.ForkChoice, error) {

return &eth2v1.ForkChoice{
JustifiedCheckpoint: phase0.Checkpoint{
Epoch: phase0.Epoch(f.JustifiedCheckpoint.Epoch),
Epoch: phase0.Epoch(f.JustifiedCheckpoint.EpochV2.Value),
Root: justifiedRoot,
},
FinalizedCheckpoint: phase0.Checkpoint{
Epoch: phase0.Epoch(f.FinalizedCheckpoint.Epoch),
Epoch: phase0.Epoch(f.FinalizedCheckpoint.EpochV2.Value),
Root: finalizedRoot,
},
ForkChoiceNodes: nodes,
Expand Down Expand Up @@ -69,12 +69,12 @@ func (f *ForkChoiceNode) AsGoEth2ClientV1ForkChoiceNode() (*eth2v1.ForkChoiceNod
}

return &eth2v1.ForkChoiceNode{
Slot: phase0.Slot(f.Slot),
Slot: phase0.Slot(f.SlotV2.Value),
BlockRoot: blockRoot,
ParentRoot: parentRoot,
JustifiedEpoch: phase0.Epoch(f.JustifiedEpoch),
FinalizedEpoch: phase0.Epoch(f.FinalizedEpoch),
Weight: f.Weight,
JustifiedEpoch: phase0.Epoch(f.JustifiedEpochV2.Value),
FinalizedEpoch: phase0.Epoch(f.FinalizedEpochV2.Value),
Weight: f.WeightV2.Value,
Validity: eth2v1.ForkChoiceNodeValidity(f.Validity),
ExecutionBlockHash: executionBlockHash,
ExtraData: extraData,
Expand Down

0 comments on commit 1c0a89f

Please sign in to comment.