Add proposer suppot for Electra (#13987)

This commit is contained in:
terence
2024-05-12 06:55:01 -07:00
committed by GitHub
parent c08d2f36b0
commit d71079e1d8
5 changed files with 74 additions and 13 deletions

View File

@@ -30,6 +30,8 @@ func NewSignedBeaconBlockFromGeneric(gb *eth.GenericSignedBeaconBlock) (interfac
return blocks.NewSignedBeaconBlock(bb.Deneb.Block)
case *eth.GenericSignedBeaconBlock_BlindedDeneb:
return blocks.NewSignedBeaconBlock(bb.BlindedDeneb)
case *eth.GenericSignedBeaconBlock_Electra:
return blocks.NewSignedBeaconBlock(bb.Electra.Block)
// Generic Signed Beacon Block Deneb can't be used here as it is not a block, but block content with blobs
default:
return nil, errors.Wrapf(blocks.ErrUnsupportedSignedBeaconBlock, "unable to create block from type %T", gb)