Skip to content

Commit

Permalink
fix: Add handling for Phase0 block message (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm authored Oct 24, 2024
1 parent 26dfce5 commit eeb551b
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 eeb551b

Please sign in to comment.