From 5a6c4da72794fc5a00b3a8d0ce1aaf046be2e7ae Mon Sep 17 00:00:00 2001 From: Arijit Das Date: Tue, 18 Jan 2022 22:48:59 +0530 Subject: [PATCH] Update go.mod. --- go.mod | 4 ++-- pkg/validator/config.go | 3 +-- pkg/validator/validator.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 6d4ca20..c38fd06 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,8 @@ go 1.17 require ( github.com/ethereum/go-ethereum v1.10.14 github.com/jmoiron/sqlx v1.2.0 + github.com/onsi/ginkgo v1.16.5 + github.com/onsi/gomega v1.13.0 github.com/sirupsen/logrus v1.7.0 github.com/spf13/cobra v1.3.0 github.com/spf13/viper v1.10.0 @@ -192,8 +194,6 @@ require ( github.com/multiformats/go-varint v0.0.6 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect - github.com/onsi/gomega v1.13.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect diff --git a/pkg/validator/config.go b/pkg/validator/config.go index 5409541..58f7427 100644 --- a/pkg/validator/config.go +++ b/pkg/validator/config.go @@ -4,14 +4,13 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/statediff/indexer/node" "github.com/ethereum/go-ethereum/statediff/indexer/postgres" "github.com/spf13/viper" ) -var TestChainConfig = ¶ms.ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(100), big.NewInt(0), nil, nil, new(params.EthashConfig), nil} +var testChainConfig = ¶ms.ChainConfig{ChainID: big.NewInt(1), HomesteadBlock: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(100), ArrowGlacierBlock: big.NewInt(0), Ethash: new(params.EthashConfig)} type Config struct { dbParams postgres.ConnectionParams diff --git a/pkg/validator/validator.go b/pkg/validator/validator.go index 72c3e65..7f6dbb3 100644 --- a/pkg/validator/validator.go +++ b/pkg/validator/validator.go @@ -260,7 +260,7 @@ func setChainConfig(ghash common.Hash) *params.ChainConfig { case ghash == params.GoerliGenesisHash: return params.GoerliChainConfig case ghash == testHash: - return TestChainConfig + return testChainConfig default: return params.AllEthashProtocolChanges }