mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
fix graphql test
This commit is contained in:
parent
739baec2f8
commit
58018396af
1 changed files with 6 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/ethereum/go-ethereum/common/math"
|
||||
"io"
|
||||
"math/big"
|
||||
"net/http"
|
||||
|
|
@ -459,12 +460,14 @@ func newGQLService(t *testing.T, stack *node.Node, shanghai bool, gspec *core.Ge
|
|||
var engine consensus.Engine = ethash.NewFaker()
|
||||
if shanghai {
|
||||
engine = beacon.NewFaker()
|
||||
chainCfg := gspec.Config
|
||||
chainCfg.TerminalTotalDifficulty = common.Big0
|
||||
gspec.Config.TerminalTotalDifficulty = common.Big0
|
||||
// GenerateChain will increment timestamps by 10.
|
||||
// Shanghai upgrade at block 1.
|
||||
shanghaiTime := uint64(5)
|
||||
chainCfg.ShanghaiTime = &shanghaiTime
|
||||
gspec.Config.ShanghaiTime = &shanghaiTime
|
||||
} else {
|
||||
// set an arbitrary large ttd as chains are required to be known to be merged
|
||||
gspec.Config.TerminalTotalDifficulty = big.NewInt(math.MaxInt64)
|
||||
}
|
||||
ethBackend, err := eth.New(stack, ethConf)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue