trie: add difference iterator (#3637)
This PR implements a differenceIterator, which allows iterating over trie nodes that exist in one trie but not in another. This is a prerequisite for most GC strategies, in order to find obsolete nodes.
This commit is contained in:
committed by
Felix Lange
parent
024d41d0c2
commit
555273495b
@ -81,9 +81,9 @@ func checkTrieConsistency(db Database, root common.Hash) error {
|
||||
return nil // // Consider a non existent state consistent
|
||||
}
|
||||
it := NewNodeIterator(trie)
|
||||
for it.Next() {
|
||||
for it.Next(true) {
|
||||
}
|
||||
return it.Error
|
||||
return it.Error()
|
||||
}
|
||||
|
||||
// Tests that an empty trie is not scheduled for syncing.
|
||||
|
Reference in New Issue
Block a user