From 555273495b413069e9422b04aa46251146c752b2 Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Wed, 22 Feb 2017 22:49:34 +0000 Subject: 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. --- trie/sync_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'trie/sync_test.go') diff --git a/trie/sync_test.go b/trie/sync_test.go index 4168c4d65..acae039cd 100644 --- a/trie/sync_test.go +++ b/trie/sync_test.go @@ -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. -- cgit