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:
Nick Johnson
2017-02-22 22:49:34 +00:00
committed by Felix Lange
parent 024d41d0c2
commit 555273495b
5 changed files with 327 additions and 130 deletions

View File

@ -159,7 +159,7 @@ func (t *SecureTrie) Iterator() *Iterator {
return t.trie.Iterator()
}
func (t *SecureTrie) NodeIterator() *NodeIterator {
func (t *SecureTrie) NodeIterator() NodeIterator {
return NewNodeIterator(&t.trie)
}