mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Removes fork-specific concrete type getters (#13941)
* removing typed pb accessors * refactor ssz api resp handlers to avoid typed pbs * json get block handler refactor * SubmitBlindedBlock to use generic json handling * update SubmitBlindedBlock * clear out more usages of PbForkname methods * remove fork-specific getters from block interface * remove usages of payload pb methods * remove pb helpers from execution payload interface * Update beacon-chain/rpc/eth/beacon/handlers.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/handlers.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/builder/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/builder/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/builder/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/builder/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/builder/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Radek review * fix error message * deal with wonky builder responses * ✂️ * gaz * lint * tweaks for deep source --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
@@ -128,11 +128,16 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK
|
||||
|
||||
var genericSignedBlock *ethpb.GenericSignedBeaconBlock
|
||||
if blk.Version() >= version.Deneb && !blk.IsBlinded() {
|
||||
denebBlock, err := blk.PbDenebBlock()
|
||||
pb, err := blk.Proto()
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to get deneb block")
|
||||
return
|
||||
}
|
||||
denebBlock, ok := pb.(*ethpb.SignedBeaconBlockDeneb)
|
||||
if !ok {
|
||||
log.WithError(err).Error("Failed to get deneb block - assertion failure")
|
||||
return
|
||||
}
|
||||
genericSignedBlock = ðpb.GenericSignedBeaconBlock{
|
||||
Block: ðpb.GenericSignedBeaconBlock_Deneb{
|
||||
Deneb: ðpb.SignedBeaconBlockContentsDeneb{
|
||||
|
||||
Reference in New Issue
Block a user