aboutsummaryrefslogtreecommitdiffstats
path: root/les/helper_test.go
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2018-08-16 04:25:46 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-08-16 04:25:46 +0800
commit2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2 (patch)
tree128c3fe2780f604f9eac5d7ff2292994ed2102f6 /les/helper_test.go
parente8752f4e9f9be3d2932cd4835a5d72d17ac2338b (diff)
downloadgo-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar
go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.gz
go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.bz2
go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.lz
go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.xz
go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.zst
go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.zip
light: CHT and bloom trie indexers working in light mode (#16534)
This PR enables the indexers to work in light client mode by downloading a part of these tries (the Merkle proofs of the last values of the last known section) in order to be able to add new values and recalculate subsequent hashes. It also adds CHT data to NodeInfo.
Diffstat (limited to 'les/helper_test.go')
-rw-r--r--les/helper_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/les/helper_test.go b/les/helper_test.go
index 8fd01a39e..50c97e06e 100644
--- a/les/helper_test.go
+++ b/les/helper_test.go
@@ -156,12 +156,12 @@ func newTestProtocolManager(lightSync bool, blocks int, generator func(int, *cor
} else {
blockchain, _ := core.NewBlockChain(db, nil, gspec.Config, engine, vm.Config{})
- chtIndexer := light.NewChtIndexer(db, false)
+ chtIndexer := light.NewChtIndexer(db, false, nil)
chtIndexer.Start(blockchain)
- bbtIndexer := light.NewBloomTrieIndexer(db, false)
+ bbtIndexer := light.NewBloomTrieIndexer(db, false, nil)
- bloomIndexer := eth.NewBloomIndexer(db, params.BloomBitsBlocks)
+ bloomIndexer := eth.NewBloomIndexer(db, params.BloomBitsBlocks, light.HelperTrieProcessConfirmations)
bloomIndexer.AddChildIndexer(bbtIndexer)
bloomIndexer.Start(blockchain)