Skip to content

Commit

Permalink
don't try to deserialize a storage leaf into an account
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed May 27, 2021
1 parent ed61f4d commit da54047
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/state/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ func (it *NodeIterator) step() error {
it.state, it.stateIt = nil, nil
return nil
}
// If the state trie node is an internal entry, leave as is
if !it.stateIt.Leaf() {
// If the state trie node is an internal entry, or if it is a
// a storage leaf, leave as is.
if !it.stateIt.Leaf() || len(it.stateIt.LeafBlob()) == 33 {
return nil
}
// Otherwise we've reached an account node, initiate data iteration
Expand Down

0 comments on commit da54047

Please sign in to comment.