From d2b304535bfabf93256e80e3ef931d9291ff97e2 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 17 Jul 2018 11:06:45 -0400 Subject: [PATCH] Fix caching code size --- state/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }