Skip to content

Commit

Permalink
fix: Add handling for Phase0 block message
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Oct 24, 2024
1 parent 26dfce5 commit 25a4c65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cannon/deriver/beacon/eth/v2/beacon_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ func (b *BeaconBlockDeriver) getAdditionalData(_ context.Context, block *spec.Ve

func getBlockMessage(block *spec.VersionedSignedBeaconBlock) (ssz.Marshaler, error) {
switch block.Version {
case spec.DataVersionPhase0:
return block.Phase0.Message, nil
case spec.DataVersionAltair:
return block.Altair.Message, nil
case spec.DataVersionBellatrix:
Expand Down
2 changes: 2 additions & 0 deletions pkg/sentry/event/beacon/eth/v2/beacon_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ func (e *BeaconBlock) getAdditionalData(_ context.Context) (*xatu.ClientMeta_Add

func getBlockMessage(block *spec.VersionedSignedBeaconBlock) (ssz.Marshaler, error) {
switch block.Version {
case spec.DataVersionPhase0:
return block.Phase0.Message, nil
case spec.DataVersionAltair:
return block.Altair.Message, nil
case spec.DataVersionBellatrix:
Expand Down

0 comments on commit 25a4c65

Please sign in to comment.