Fix caching code size

This commit is contained in:
Aleksandr Bezobchuk 2018-07-17 11:06:45 -04:00
parent 377b7f06c5
commit d2b304535b

View File

@ -166,7 +166,7 @@ func (db *Database) CopyTrie(ethstate.Trie) ethstate.Trie {
func (db *Database) ContractCode(addrHash, codeHash ethcommon.Hash) ([]byte, error) {
code := db.codeDB.Get(codeHash[:])
db.codeSizeCache.Add(codeHash, code)
db.codeSizeCache.Add(codeHash, len(code))
return code, nil
}