MCPcopy
hub / github.com/bnb-chain/bsc / diffAccountIterator

Struct diffAccountIterator

core/state/snapshot/iterator.go:73–83  ·  view source on GitHub ↗

diffAccountIterator is an account iterator that steps over the accounts (both live and deleted) contained within a single diff layer. Higher order iterators will use the deleted accounts to skip deeper iterators.

Source from the content-addressed store, hash-verified

71// live and deleted) contained within a single diff layer. Higher order iterators
72// will use the deleted accounts to skip deeper iterators.
73type diffAccountIterator struct {
74 // curHash is the current hash the iterator is positioned on. The field is
75 // explicitly tracked since the referenced diff layer might go stale after
76 // the iterator was positioned and we don't want to fail accessing the old
77 // hash as long as the iterator is not touched any more.
78 curHash common.Hash
79
80 layer *diffLayer // Live layer to retrieve values from
81 keys []common.Hash // Keys left in the layer to iterate
82 fail error // Any failures encountered (stale)
83}
84
85// AccountIterator creates an account iterator over a single diff layer.
86func (dl *diffLayer) AccountIterator(seek common.Hash) AccountIterator {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected