mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Fix proposer slashing context timeout test (#6379)
* Fix proposer slashing context timeout test * goimports * revert slashing change * Merge branch 'master' into fix_proposer_slashing_test
This commit is contained in:
parent
edb08bd209
commit
b8e1bf0445
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user