aboutsummaryrefslogtreecommitdiffstats
path: root/light/odr_util.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/odr_util.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/odr_util.go')
-rw-r--r--light/odr_util.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/light/odr_util.go b/light/odr_util.go
index 33a8e80ce..8f92d6442 100644
--- a/light/odr_util.go
+++ b/light/odr_util.go
@@ -52,13 +52,13 @@ func GetHeaderByNumber(ctx context.Context, odr OdrBackend, number uint64) (*typ
for chtCount > 0 && canonicalHash != sectionHead && canonicalHash != (common.Hash{}) {
chtCount--
if chtCount > 0 {
- sectionHeadNum = chtCount*ChtFrequency - 1
+ sectionHeadNum = chtCount*CHTFrequencyClient - 1
sectionHead = odr.ChtIndexer().SectionHead(chtCount - 1)
canonicalHash = core.GetCanonicalHash(db, sectionHeadNum)
}
}
}
- if number >= chtCount*ChtFrequency {
+ if number >= chtCount*CHTFrequencyClient {
return nil, ErrNoTrustedCht
}
r := &ChtRequest{ChtRoot: GetChtRoot(db, chtCount-1, sectionHead), ChtNum: chtCount - 1, BlockNum: number}