diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-09-20 20:10:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 20:10:04 +0800 |
commit | f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe (patch) | |
tree | 73a82b84d96b80e162fa3851828e0c83552d8184 /light/lightchain.go | |
parent | d6254f827bf493c1471a806b7b8a0e9b86c8c420 (diff) | |
parent | af89093116d2a4657c79d55f61b4293753b52588 (diff) | |
download | dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.tar dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.tar.gz dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.tar.bz2 dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.tar.lz dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.tar.xz dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.tar.zst dexon-f55c26ae6d0f25b4aa6b1bd103720067d1fec9fe.zip |
Merge pull request #17719 from karalabe/update-chts
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 { |