Merge pull request #438 from cosmos/bez/code-size-cache-fix

Fix missed cache storage in ContractCodeSize
This commit is contained in:
Jack Zampolin 2018-07-17 08:21:13 -07:00 committed by GitHub
commit 6f9af564d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,8 @@ func (db *Database) ContractCodeSize(addrHash, codeHash ethcommon.Hash) (int, er
return cached.(int), nil
}
return len(db.codeDB.Get(codeHash[:])), nil
code, err := db.ContractCode(addrHash, codeHash)
return len(code), err
}
// Commit commits the underlying Cosmos SDK multi-store returning the commit