mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 11:31:02 +00:00
graphql: fix race in withdrawals test (#27706)
graphql: fix race in test
This commit is contained in:
parent
714f75943b
commit
4f0d8f0d15
@ -445,19 +445,21 @@ func newGQLService(t *testing.T, stack *node.Node, shanghai bool, gspec *core.Ge
|
||||
TrieTimeout: 60 * time.Minute,
|
||||
SnapshotCache: 5,
|
||||
}
|
||||
ethBackend, err := eth.New(stack, ethConf)
|
||||
if err != nil {
|
||||
t.Fatalf("could not create eth backend: %v", err)
|
||||
}
|
||||
var engine consensus.Engine = ethash.NewFaker()
|
||||
if shanghai {
|
||||
engine = beacon.NewFaker()
|
||||
chainCfg := gspec.Config
|
||||
chainCfg.TerminalTotalDifficultyPassed = true
|
||||
chainCfg.TerminalTotalDifficulty = common.Big0
|
||||
shanghaiTime := uint64(0)
|
||||
// GenerateChain will increment timestamps by 10.
|
||||
// Shanghai upgrade at block 1.
|
||||
shanghaiTime := uint64(5)
|
||||
chainCfg.ShanghaiTime = &shanghaiTime
|
||||
}
|
||||
ethBackend, err := eth.New(stack, ethConf)
|
||||
if err != nil {
|
||||
t.Fatalf("could not create eth backend: %v", err)
|
||||
}
|
||||
// Create some blocks and import them
|
||||
chain, _ := core.GenerateChain(params.AllEthashProtocolChanges, ethBackend.BlockChain().Genesis(),
|
||||
engine, ethBackend.ChainDb(), genBlocks, genfunc)
|
||||
|
Loading…
Reference in New Issue
Block a user