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"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/ethereum/go-ethereum/common/math"
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
"net/http"
|
"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()
|
var engine consensus.Engine = ethash.NewFaker()
|
||||||
if shanghai {
|
if shanghai {
|
||||||
engine = beacon.NewFaker()
|
engine = beacon.NewFaker()
|
||||||
chainCfg := gspec.Config
|
gspec.Config.TerminalTotalDifficulty = common.Big0
|
||||||
chainCfg.TerminalTotalDifficulty = common.Big0
|
|
||||||
// GenerateChain will increment timestamps by 10.
|
// GenerateChain will increment timestamps by 10.
|
||||||
// Shanghai upgrade at block 1.
|
// Shanghai upgrade at block 1.
|
||||||
shanghaiTime := uint64(5)
|
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)
|
ethBackend, err := eth.New(stack, ethConf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue