diff --git a/core/state/state_object.go b/core/state/state_object.go index 71d3a678c66a..3ecc7a926f33 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -365,10 +365,9 @@ func (s *stateObject) updateTrie(db Database) Trie { } s.db.StorageDeleted += 1 } else { + // Encoding []byte cannot fail, ok to ignore the error. + v, _ = rlp.EncodeToBytes(common.TrimLeftZeroes(value[:])) if !tr.IsVerkle() { - // Encoding []byte cannot fail, ok to ignore the error. - v, _ = rlp.EncodeToBytes(common.TrimLeftZeroes(value[:])) - s.setError(tr.TryUpdate(key[:], v)) } else { k := trieUtils.GetTreeKeyStorageSlot(s.address[:], new(uint256.Int).SetBytes(key[:]))