diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-09-20 19:11:14 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-09-20 19:14:48 +0800 |
commit | af89093116d2a4657c79d55f61b4293753b52588 (patch) | |
tree | 73a0b04eb9e3965be98219649f12595d9a26379c /light/odr.go | |
parent | f89dce0126f92eb5f3245f6b8e8b1e3ac13641b3 (diff) | |
download | dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.gz dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.zst dexon-af89093116d2a4657c79d55f61b4293753b52588.zip |
les, light, params: update light client CHTs
Diffstat (limited to 'light/odr.go')
-rw-r--r-- | light/odr.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/light/odr.go b/light/odr.go index 3cd8b2c04..900be0544 100644 --- a/light/odr.go +++ b/light/odr.go @@ -157,18 +157,18 @@ func (req *ChtRequest) StoreResult(db ethdb.Database) { // BloomRequest is the ODR request type for retrieving bloom filters from a CHT structure type BloomRequest struct { OdrRequest - Config *IndexerConfig - BloomTrieNum uint64 - BitIdx uint - SectionIdxList []uint64 - BloomTrieRoot common.Hash - BloomBits [][]byte - Proofs *NodeSet + Config *IndexerConfig + BloomTrieNum uint64 + BitIdx uint + SectionIndexList []uint64 + BloomTrieRoot common.Hash + BloomBits [][]byte + Proofs *NodeSet } // StoreResult stores the retrieved data in local database func (req *BloomRequest) StoreResult(db ethdb.Database) { - for i, sectionIdx := range req.SectionIdxList { + for i, sectionIdx := range req.SectionIndexList { sectionHead := rawdb.ReadCanonicalHash(db, (sectionIdx+1)*req.Config.BloomTrieSize-1) // if we don't have the canonical hash stored for this section head number, we'll still store it under // a key with a zero sectionHead. GetBloomBits will look there too if we still don't have the canonical |