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/lightchain.go | |
parent | f89dce0126f92eb5f3245f6b8e8b1e3ac13641b3 (diff) | |
download | go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.tar go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.tar.gz go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.tar.bz2 go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.tar.lz go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.tar.xz go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.tar.zst go-tangerine-af89093116d2a4657c79d55f61b4293753b52588.zip |
les, light, params: update light client CHTs
Diffstat (limited to 'light/lightchain.go')
-rw-r--r-- | light/lightchain.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/light/lightchain.go b/light/lightchain.go index 81bdaad75..8e2734c2d 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -118,19 +118,19 @@ func NewLightChain(odr OdrBackend, config *params.ChainConfig, engine consensus. } // addTrustedCheckpoint adds a trusted checkpoint to the blockchain -func (self *LightChain) addTrustedCheckpoint(cp TrustedCheckpoint) { +func (self *LightChain) addTrustedCheckpoint(cp *params.TrustedCheckpoint) { if self.odr.ChtIndexer() != nil { - StoreChtRoot(self.chainDb, cp.SectionIdx, cp.SectionHead, cp.CHTRoot) - self.odr.ChtIndexer().AddCheckpoint(cp.SectionIdx, cp.SectionHead) + StoreChtRoot(self.chainDb, cp.SectionIndex, cp.SectionHead, cp.CHTRoot) + self.odr.ChtIndexer().AddCheckpoint(cp.SectionIndex, cp.SectionHead) } if self.odr.BloomTrieIndexer() != nil { - StoreBloomTrieRoot(self.chainDb, cp.SectionIdx, cp.SectionHead, cp.BloomRoot) - self.odr.BloomTrieIndexer().AddCheckpoint(cp.SectionIdx, cp.SectionHead) + StoreBloomTrieRoot(self.chainDb, cp.SectionIndex, cp.SectionHead, cp.BloomRoot) + self.odr.BloomTrieIndexer().AddCheckpoint(cp.SectionIndex, cp.SectionHead) } if self.odr.BloomIndexer() != nil { - self.odr.BloomIndexer().AddCheckpoint(cp.SectionIdx, cp.SectionHead) + self.odr.BloomIndexer().AddCheckpoint(cp.SectionIndex, cp.SectionHead) } - log.Info("Added trusted checkpoint", "chain", cp.name, "block", (cp.SectionIdx+1)*self.indexerConfig.ChtSize-1, "hash", cp.SectionHead) + log.Info("Added trusted checkpoint", "chain", cp.Name, "block", (cp.SectionIndex+1)*self.indexerConfig.ChtSize-1, "hash", cp.SectionHead) } func (self *LightChain) getProcInterrupt() bool { |