mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
Do not propose a block when compute state root fails (#1972)
This commit is contained in:
parent
c320877dea
commit
a7a22856f2
@ -110,7 +110,8 @@ func (v *validator) ProposeBlock(ctx context.Context, slot uint64) {
|
||||
if err != nil {
|
||||
log.WithField(
|
||||
"block", proto.MarshalTextString(block),
|
||||
).Errorf("Unable to compute state root: %v", err)
|
||||
).Errorf("Not proposing! Unable to compute state root: %v", err)
|
||||
return
|
||||
}
|
||||
block.StateRootHash32 = resp.GetStateRoot()
|
||||
|
||||
|
@ -354,11 +354,6 @@ func TestProposeBlock_ComputeStateFailure(t *testing.T) {
|
||||
gomock.AssignableToTypeOf(&pb.PendingAttestationsRequest{}),
|
||||
).Return(&pb.PendingAttestationsResponse{PendingAttestations: []*pbp2p.Attestation{}}, nil)
|
||||
|
||||
m.proposerClient.EXPECT().ProposeBlock(
|
||||
gomock.Any(), // ctx
|
||||
gomock.AssignableToTypeOf(&pbp2p.BeaconBlock{}),
|
||||
).Return(&pb.ProposeResponse{}, nil /*error*/)
|
||||
|
||||
m.proposerClient.EXPECT().ComputeStateRoot(
|
||||
gomock.Any(), // context
|
||||
gomock.AssignableToTypeOf(&pbp2p.BeaconBlock{}),
|
||||
|
Loading…
Reference in New Issue
Block a user