aboutsummaryrefslogtreecommitdiffstats
path: root/trie/sync_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-03-14 21:25:12 +0800
committerGitHub <noreply@github.com>2019-03-14 21:25:12 +0800
commit91eec1251c06727581063cd7e942ba913d806971 (patch)
treee47da6be2a8b15116b773855cf06473d5b4b64ed /trie/sync_test.go
parente270a753bec7e723e7909b55543a54e26210dd8a (diff)
downloadgo-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.gz
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.bz2
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.lz
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.xz
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.zst
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.zip
cmd, core, eth, trie: get rid of trie cache generations (#19262)
* cmd, core, eth, trie: get rid of trie cache generations * core, trie: get rid of remainder of cache gen boilerplate
Diffstat (limited to 'trie/sync_test.go')
-rw-r--r--trie/sync_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/trie/sync_test.go b/trie/sync_test.go
index d80070f3e..0d8c29cfe 100644
--- a/trie/sync_test.go
+++ b/trie/sync_test.go
@@ -133,7 +133,7 @@ func testIterativeSync(t *testing.T, batch int) {
queue = append(queue[:0], sched.Missing(batch)...)
}
// Cross check that the two tries are in sync
- checkTrieContents(t, triedb, srcTrie.Root(), srcData)
+ checkTrieContents(t, triedb, srcTrie.Hash().Bytes(), srcData)
}
// Tests that the trie scheduler can correctly reconstruct the state even if only
@@ -167,7 +167,7 @@ func TestIterativeDelayedSync(t *testing.T) {
queue = append(queue[len(results):], sched.Missing(10000)...)
}
// Cross check that the two tries are in sync
- checkTrieContents(t, triedb, srcTrie.Root(), srcData)
+ checkTrieContents(t, triedb, srcTrie.Hash().Bytes(), srcData)
}
// Tests that given a root hash, a trie can sync iteratively on a single thread,
@@ -212,7 +212,7 @@ func testIterativeRandomSync(t *testing.T, batch int) {
}
}
// Cross check that the two tries are in sync
- checkTrieContents(t, triedb, srcTrie.Root(), srcData)
+ checkTrieContents(t, triedb, srcTrie.Hash().Bytes(), srcData)
}
// Tests that the trie scheduler can correctly reconstruct the state even if only
@@ -259,7 +259,7 @@ func TestIterativeRandomDelayedSync(t *testing.T) {
}
}
// Cross check that the two tries are in sync
- checkTrieContents(t, triedb, srcTrie.Root(), srcData)
+ checkTrieContents(t, triedb, srcTrie.Hash().Bytes(), srcData)
}
// Tests that a trie sync will not request nodes multiple times, even if they
@@ -299,7 +299,7 @@ func TestDuplicateAvoidanceSync(t *testing.T) {
queue = append(queue[:0], sched.Missing(0)...)
}
// Cross check that the two tries are in sync
- checkTrieContents(t, triedb, srcTrie.Root(), srcData)
+ checkTrieContents(t, triedb, srcTrie.Hash().Bytes(), srcData)
}
// Tests that at any point in time during a sync, only complete sub-tries are in