Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Oct 11, 2023
1 parent 794682e commit 76c73b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (b *DebugForkChoiceReorg) Validate(_ context.Context) error {
return errors.New("failed to cast event data")
}

//nolint:staticcheck // Handled by v2
if event.EthV1ForkChoiceReorg.Before == nil && event.EthV1ForkChoiceReorg.After == nil {
return errors.New("both before and after fork choice snapshots are nil")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,19 @@ func (b *BeaconBlock) Filter(ctx context.Context) bool {

switch version {
case "phase0":
//nolint:staticcheck // Handled by v2
hash = data.EthV2BeaconBlock.Message.(*v2.EventBlock_Phase0Block).Phase0Block.StateRoot
case "altair":
//nolint:staticcheck // Handled by v2
hash = data.EthV2BeaconBlock.Message.(*v2.EventBlock_AltairBlock).AltairBlock.StateRoot
case "bellatrix":
//nolint:staticcheck // Handled by v2
hash = data.EthV2BeaconBlock.Message.(*v2.EventBlock_BellatrixBlock).BellatrixBlock.StateRoot
case "capella":
//nolint:staticcheck // Handled by v2
hash = data.EthV2BeaconBlock.Message.(*v2.EventBlock_CapellaBlock).CapellaBlock.StateRoot
case "deneb":
//nolint:staticcheck // Handled by v2
hash = data.EthV2BeaconBlock.Message.(*v2.EventBlock_DenebBlock).DenebBlock.StateRoot
default:
b.log.Error(fmt.Errorf("unknown version: %s", version))
Expand Down

0 comments on commit 76c73b3

Please sign in to comment.