diff --git a/core/state/statedb.go b/core/state/statedb.go index 8ad25a5824..a019f4e8fe 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -486,7 +486,14 @@ func (db *StateDB) ForEachStorage(addr common.Address, cb func(key, value common cb(key, value) continue } - cb(key, common.BytesToHash(it.Value)) + + if len(it.Value) > 0 { + _, content, _, err := rlp.Split(it.Value) + if err != nil { + continue + } + cb(key, common.BytesToHash(content)) + } } }