Skip to content

Commit

Permalink
Fix geth panic
Browse files Browse the repository at this point in the history
  • Loading branch information
wsodsong committed Oct 30, 2024
1 parent c5149d9 commit 668d686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ethtest/test_case_splitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ func NewTestCaseSplitter(cfg *utils.Config) (*TestCaseSplitter, error) {
}, nil
}

func sortForks(log logger.Logger, fork string) (forks []string) {
fork = utils.ToTitleCase(fork)
if fork == "All" {
func sortForks(log logger.Logger, cfgFork string) (forks []string) {
cfgFork = utils.ToTitleCase(cfgFork)
if cfgFork == "All" {
forks = maps.Keys(usableForks)
} else {
if _, ok := usableForks[fork]; !ok {
log.Warningf("Unknown name fork name %v, removing", fork)
if _, ok := usableForks[cfgFork]; !ok {
log.Warningf("Unknown name fork name %v, removing", cfgFork)
} else {
forks = append(forks, fork)
forks = append(forks, cfgFork)
}
}
return forks
Expand Down
2 changes: 1 addition & 1 deletion utils/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func makeStateDBVariant(
case "memory":
return state.MakeEmptyGethInMemoryStateDB(variant)
case "geth":
chainCfg, err := cfg.GetChainConfig(cfg.Fork)
chainCfg, err := cfg.GetChainConfig("")
if err != nil {
return nil, fmt.Errorf("cannot get chain config: %w", err)
}
Expand Down

0 comments on commit 668d686

Please sign in to comment.