core, eth, les, trie: remove the sync bloom, used by fast sync
This commit is contained in:
@ -95,7 +95,7 @@ func TestEmptySync(t *testing.T) {
|
||||
emptyB, _ := New(emptyRoot, dbB)
|
||||
|
||||
for i, trie := range []*Trie{emptyA, emptyB} {
|
||||
sync := NewSync(trie.Hash(), memorydb.New(), nil, NewSyncBloom(1, memorydb.New()))
|
||||
sync := NewSync(trie.Hash(), memorydb.New(), nil)
|
||||
if nodes, paths, codes := sync.Missing(1); len(nodes) != 0 || len(paths) != 0 || len(codes) != 0 {
|
||||
t.Errorf("test %d: content requested for empty trie: %v, %v, %v", i, nodes, paths, codes)
|
||||
}
|
||||
@ -116,7 +116,7 @@ func testIterativeSync(t *testing.T, count int, bypath bool) {
|
||||
// Create a destination trie and sync with the scheduler
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
nodes, paths, codes := sched.Missing(count)
|
||||
var (
|
||||
@ -177,7 +177,7 @@ func TestIterativeDelayedSync(t *testing.T) {
|
||||
// Create a destination trie and sync with the scheduler
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
nodes, _, codes := sched.Missing(10000)
|
||||
queue := append(append([]common.Hash{}, nodes...), codes...)
|
||||
@ -223,7 +223,7 @@ func testIterativeRandomSync(t *testing.T, count int) {
|
||||
// Create a destination trie and sync with the scheduler
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
queue := make(map[common.Hash]struct{})
|
||||
nodes, _, codes := sched.Missing(count)
|
||||
@ -271,7 +271,7 @@ func TestIterativeRandomDelayedSync(t *testing.T) {
|
||||
// Create a destination trie and sync with the scheduler
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
queue := make(map[common.Hash]struct{})
|
||||
nodes, _, codes := sched.Missing(10000)
|
||||
@ -324,7 +324,7 @@ func TestDuplicateAvoidanceSync(t *testing.T) {
|
||||
// Create a destination trie and sync with the scheduler
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
nodes, _, codes := sched.Missing(0)
|
||||
queue := append(append([]common.Hash{}, nodes...), codes...)
|
||||
@ -371,7 +371,7 @@ func TestIncompleteSync(t *testing.T) {
|
||||
// Create a destination trie and sync with the scheduler
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
var added []common.Hash
|
||||
|
||||
@ -431,7 +431,7 @@ func TestSyncOrdering(t *testing.T) {
|
||||
// Create a destination trie and sync with the scheduler, tracking the requests
|
||||
diskdb := memorydb.New()
|
||||
triedb := NewDatabase(diskdb)
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil, NewSyncBloom(1, diskdb))
|
||||
sched := NewSync(srcTrie.Hash(), diskdb, nil)
|
||||
|
||||
nodes, paths, _ := sched.Missing(1)
|
||||
queue := append([]common.Hash{}, nodes...)
|
||||
|
Reference in New Issue
Block a user