From 58018396afad1cf5b22c4dbb0dd49246a38a283f Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 16 Oct 2024 21:00:46 +0700 Subject: [PATCH] fix graphql test --- graphql/graphql_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/graphql/graphql_test.go b/graphql/graphql_test.go index 73554d738d..2e4be71475 100644 --- a/graphql/graphql_test.go +++ b/graphql/graphql_test.go @@ -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 {