From 1c0a89fc0ec1ae48338fe43b8899ac7a26aeed46 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 22 Aug 2023 12:54:10 +1000 Subject: [PATCH] refactor: Update field names and values in ForkChoice and ForkChoiceNode --- pkg/proto/eth/v1/fork_choice.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/proto/eth/v1/fork_choice.go b/pkg/proto/eth/v1/fork_choice.go index 2cc3ab8e..2a8dc7c9 100644 --- a/pkg/proto/eth/v1/fork_choice.go +++ b/pkg/proto/eth/v1/fork_choice.go @@ -34,11 +34,11 @@ func (f *ForkChoice) AsGoEth2ClientV1ForkChoice() (*eth2v1.ForkChoice, error) { return ð2v1.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, @@ -69,12 +69,12 @@ func (f *ForkChoiceNode) AsGoEth2ClientV1ForkChoiceNode() (*eth2v1.ForkChoiceNod } return ð2v1.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,