diff --git a/beacon-chain/sync/validate_proposer_slashing_test.go b/beacon-chain/sync/validate_proposer_slashing_test.go index 5cadaf256..1e9bb85d9 100644 --- a/beacon-chain/sync/validate_proposer_slashing_test.go +++ b/beacon-chain/sync/validate_proposer_slashing_test.go @@ -12,6 +12,7 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" pubsubpb "github.com/libp2p/go-libp2p-pubsub/pb" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" + "github.com/prysmaticlabs/go-bitfield" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" @@ -169,7 +170,14 @@ func TestValidateProposerSlashing_ContextTimeout(t *testing.T) { slashing, state := setupValidProposerSlashing(t) slashing.Header_1.Header.Slot = 100000000 - + err := state.SetJustificationBits(bitfield.Bitvector4{0x0F}) // 0b1111 + if err != nil { + t.Fatal(err) + } + err = state.SetPreviousJustifiedCheckpoint(ðpb.Checkpoint{Epoch: 0, Root: []byte{}}) + if err != nil { + t.Fatal(err) + } ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel()