From 97c1dc9d457e39b51ecbf5b254283ebc7401f5f5 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 18 Sep 2024 14:54:04 -0700 Subject: [PATCH] Fix tests and increase timeout --- Makefile | 2 +- cmd/geth/consolecmd_test.go | 6 +++--- cmd/geth/main.go | 2 -- cmd/utils/flags.go | 5 ++++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4cd635c081..33e8c38ed5 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: - $(GOTEST) --timeout 15m -cover -short -coverprofile=cover.out -covermode=atomic $(TESTALL) + $(GOTEST) --timeout 30m -cover -short -coverprofile=cover.out -covermode=atomic $(TESTALL) test-txpool-race: $(GOTEST) -run=TestPoolMiningDataRaces --timeout 600m -race -v ./core/ diff --git a/cmd/geth/consolecmd_test.go b/cmd/geth/consolecmd_test.go index 8bb5ed386c..9104d4f1bd 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/geth/consolecmd_test.go @@ -30,7 +30,7 @@ import ( ) const ( - ipcAPIs = "admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0" + ipcAPIs = "admin:1.0 bor:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0" httpAPIs = "eth:1.0 net:1.0 rpc:1.0 web3:1.0" ) @@ -71,7 +71,7 @@ func TestConsoleWelcome(t *testing.T) { geth.Expect(` Welcome to the Geth JavaScript console! -instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} +instance: bor/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} at block: 0 ({{niltime}}) datadir: {{.Datadir}} modules: {{apis}} @@ -143,7 +143,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { attach.Expect(` Welcome to the Geth JavaScript console! -instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} +instance: bor/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} at block: 0 ({{niltime}}){{if ipc}} datadir: {{datadir}}{{end}} modules: {{apis}} diff --git a/cmd/geth/main.go b/cmd/geth/main.go index b1c6a0bc59..f4609261e1 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -141,8 +141,6 @@ var ( utils.DNSDiscoveryFlag, utils.DeveloperFlag, utils.DeveloperGasLimitFlag, - utils.SepoliaFlag, - utils.GoerliFlag, utils.MumbaiFlag, utils.AmoyFlag, utils.BorMainnetFlag, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 5b57480105..e5d965339d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1377,7 +1377,7 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error // setEtherbase retrieves the etherbase from the directly specified command line flags. func setEtherbase(ctx *cli.Context, cfg *ethconfig.Config) { - if ctx.IsSet(MinerEtherbaseFlag.Name) { + if !ctx.IsSet(MinerEtherbaseFlag.Name) { return } @@ -2018,6 +2018,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { SetDNSDiscoveryDefaults(cfg, params.MainnetGenesisHash) } } + + log.Info("flags", "genesis", cfg.Genesis) // Set any dangling config values if ctx.String(CryptoKZGFlag.Name) != "gokzg" && ctx.String(CryptoKZGFlag.Name) != "ckzg" { Fatalf("--%s flag must be 'gokzg' or 'ckzg'", CryptoKZGFlag.Name) @@ -2093,6 +2095,7 @@ func RegisterFilterAPI(stack *node.Node, backend ethapi.Backend, ethcfg *ethconf }}) // avoiding constructor changed by introducing new method to set genesis + log.Info("filterAPI", "genesis", ethcfg.Genesis) filterAPI.SetChainConfig(ethcfg.Genesis.Config) return filterSystem