Handle blind block for DB (#10580)

* Handle blind block for DB

* Update blinded_beacon_block_bellatrix_test.go

* Update blocks_test.go

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terencechain
2022-05-03 09:55:59 -07:00
committed by GitHub
parent 59041cf868
commit d4fa490dec
9 changed files with 42 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ func (signedBlindedBeaconBlockBellatrix) PbAltairBlock() (*eth.SignedBeaconBlock
// Version of the underlying protobuf object.
func (signedBlindedBeaconBlockBellatrix) Version() int {
return version.Bellatrix
return version.BellatrixBlind
}
// Header converts the underlying protobuf object from blinded block to header format.
@@ -225,7 +225,7 @@ func (w blindedBeaconBlockBellatrix) Proto() proto.Message {
// Version of the underlying protobuf object.
func (blindedBeaconBlockBellatrix) Version() int {
return version.Bellatrix
return version.BellatrixBlind
}
// AsSignRequestObject returns the underlying sign request object.

View File

@@ -149,7 +149,7 @@ func TestBellatrixSignedBlindedBeaconBlock_Version(t *testing.T) {
wsb, err := wrapper.WrappedSignedBeaconBlock(&ethpb.SignedBlindedBeaconBlockBellatrix{Block: &ethpb.BlindedBeaconBlockBellatrix{}})
require.NoError(t, err)
assert.Equal(t, version.Bellatrix, wsb.Version())
assert.Equal(t, version.BellatrixBlind, wsb.Version())
}
func TestBellatrixBlindedBeaconBlock_Slot(t *testing.T) {
@@ -243,7 +243,7 @@ func TestBellatrixBlindedBeaconBlock_Version(t *testing.T) {
wb, err := wrapper.WrappedBeaconBlock(&ethpb.BlindedBeaconBlockBellatrix{})
require.NoError(t, err)
assert.Equal(t, version.Bellatrix, wb.Version())
assert.Equal(t, version.BellatrixBlind, wb.Version())
}
func TestBellatrixBlindedBeaconBlockBody_RandaoReveal(t *testing.T) {