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
+2 -1
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