Skip to content

Commit

Permalink
Fix tests and increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Sep 18, 2024
1 parent 2484ea9 commit 97c1dc9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
6 changes: 3 additions & 3 deletions cmd/geth/consolecmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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}}
Expand Down
2 changes: 0 additions & 2 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ var (
utils.DNSDiscoveryFlag,
utils.DeveloperFlag,
utils.DeveloperGasLimitFlag,
utils.SepoliaFlag,
utils.GoerliFlag,
utils.MumbaiFlag,
utils.AmoyFlag,
utils.BorMainnetFlag,
Expand Down
5 changes: 4 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 97c1dc9

Please sign in to comment.