Skip to content

Commit

Permalink
core/state/snapshot: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 committed Nov 16, 2024
1 parent 05ee450 commit 2534628
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/state/snapshot/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (it *diffAccountIterator) Next() bool {
}
// Iterator seems to be still alive, retrieve and cache the live hash
it.curHash = it.keys[0]

// key cached, shift the iterator and notify the user of success
it.keys = it.keys[1:]
return true
Expand All @@ -135,7 +136,7 @@ func (it *diffAccountIterator) Hash() common.Hash {
// This method may _fail_, if the underlying layer has been flattened between
// the call to Next and Account. That type of error will set it.Err.
// This method assumes that flattening does not delete elements from
// the accountdata mapping (writing nil into it is fine though), and will panic
// the accountData mapping (writing nil into it is fine though), and will panic
// if elements have been deleted.
//
// Note the returned account is not a copy, please don't modify it.
Expand Down

0 comments on commit 2534628

Please sign in to comment.