|
|
@ -445,19 +445,21 @@ func newGQLService(t *testing.T, stack *node.Node, shanghai bool, gspec *core.Ge |
|
|
|
TrieTimeout: 60 * time.Minute, |
|
|
|
TrieTimeout: 60 * time.Minute, |
|
|
|
SnapshotCache: 5, |
|
|
|
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() |
|
|
|
var engine consensus.Engine = ethash.NewFaker() |
|
|
|
if shanghai { |
|
|
|
if shanghai { |
|
|
|
engine = beacon.NewFaker() |
|
|
|
engine = beacon.NewFaker() |
|
|
|
chainCfg := gspec.Config |
|
|
|
chainCfg := gspec.Config |
|
|
|
chainCfg.TerminalTotalDifficultyPassed = true |
|
|
|
chainCfg.TerminalTotalDifficultyPassed = true |
|
|
|
chainCfg.TerminalTotalDifficulty = common.Big0 |
|
|
|
chainCfg.TerminalTotalDifficulty = common.Big0 |
|
|
|
shanghaiTime := uint64(0) |
|
|
|
// GenerateChain will increment timestamps by 10.
|
|
|
|
|
|
|
|
// Shanghai upgrade at block 1.
|
|
|
|
|
|
|
|
shanghaiTime := uint64(5) |
|
|
|
chainCfg.ShanghaiTime = &shanghaiTime |
|
|
|
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
|
|
|
|
// Create some blocks and import them
|
|
|
|
chain, _ := core.GenerateChain(params.AllEthashProtocolChanges, ethBackend.BlockChain().Genesis(), |
|
|
|
chain, _ := core.GenerateChain(params.AllEthashProtocolChanges, ethBackend.BlockChain().Genesis(), |
|
|
|
engine, ethBackend.ChainDb(), genBlocks, genfunc) |
|
|
|
engine, ethBackend.ChainDb(), genBlocks, genfunc) |
|
|
|