aboutsummaryrefslogtreecommitdiffstats
path: root/light/lightchain.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-11 20:57:46 +0800
committerGitHub <noreply@github.com>2018-02-11 20:57:46 +0800
commit7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa (patch)
tree98bc8333d5672cd4faa6a13c9a59f902c277955f /light/lightchain.go
parent5cf75a30c1ceb0ab35cd6b0532520d556996b21c (diff)
downloadgo-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.tar
go-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.tar.gz
go-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.tar.bz2
go-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.tar.lz
go-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.tar.xz
go-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.tar.zst
go-tangerine-7a0019c63b1297cb5c9a6fdfc4cb00fdae9b05aa.zip
les, light: fix CHT trie retrievals (#16039)
* les, light: fix CHT trie retrievals * les, light: minor polishes, test remote CHT retrievals * les, light: deterministic nodeset rlp, bloombits test skeleton * les: add an event emission to the les bloombits test * les: drop dead tester code
Diffstat (limited to 'light/lightchain.go')
-rw-r--r--light/lightchain.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/light/lightchain.go b/light/lightchain.go
index bc88aeb48..181a1c2a6 100644
--- a/light/lightchain.go
+++ b/light/lightchain.go
@@ -127,7 +127,7 @@ func (self *LightChain) addTrustedCheckpoint(cp trustedCheckpoint) {
if self.odr.BloomIndexer() != nil {
self.odr.BloomIndexer().AddKnownSectionHead(cp.sectionIdx, cp.sectionHead)
}
- log.Info("Added trusted checkpoint", "chain", cp.name, "block", (cp.sectionIdx+1)*ChtFrequency-1, "hash", cp.sectionHead)
+ log.Info("Added trusted checkpoint", "chain", cp.name, "block", (cp.sectionIdx+1)*CHTFrequencyClient-1, "hash", cp.sectionHead)
}
func (self *LightChain) getProcInterrupt() bool {
@@ -453,8 +453,8 @@ func (self *LightChain) SyncCht(ctx context.Context) bool {
}
headNum := self.CurrentHeader().Number.Uint64()
chtCount, _, _ := self.odr.ChtIndexer().Sections()
- if headNum+1 < chtCount*ChtFrequency {
- num := chtCount*ChtFrequency - 1
+ if headNum+1 < chtCount*CHTFrequencyClient {
+ num := chtCount*CHTFrequencyClient - 1
header, err := GetHeaderByNumber(ctx, self.odr, num)
if header != nil && err == nil {
self.mu.Lock()