evm: ForEachStorage semantic not compatible with go-ethereum (#798)

* Problem: ForEachStorage sematic not compatible with go-ethereum

Solution:
- reversed the semantic of return value of the callback function.

* changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
yihuang
2021-11-30 10:34:33 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 91b042b653
commit e6d0eff957
5 changed files with 10 additions and 9 deletions
+2 -3
View File
@@ -251,10 +251,9 @@ func initGenFiles(cfg Config, genAccounts []authtypes.GenesisAccount, genBalance
}
func WriteFile(name string, dir string, contents []byte) error {
writePath := filepath.Join(dir)
file := filepath.Join(writePath, name)
file := filepath.Join(dir, name)
err := tmos.EnsureDir(writePath, 0o755)
err := tmos.EnsureDir(dir, 0o755)
if err != nil {
return err
}