diff --git a/state/database.go b/state/database.go index da9b05f6..a96b4ad4 100644 --- a/state/database.go +++ b/state/database.go @@ -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 }