We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14b260f commit 59f60cdCopy full SHA for 59f60cd
les/handler.go
@@ -846,8 +846,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
846
}
847
848
if header := pm.blockchain.GetHeaderByNumber(req.BlockNum); header != nil {
849
- sectionHead := core.GetCanonicalHash(pm.chainDb, (req.ChtNum+1)*light.ChtV1Frequency-1)
850
- if root := light.GetChtRoot(pm.chainDb, req.ChtNum, sectionHead); root != (common.Hash{}) {
+ sectionHead := core.GetCanonicalHash(pm.chainDb, req.ChtNum*light.ChtV1Frequency-1)
+ if root := light.GetChtRoot(pm.chainDb, req.ChtNum-1, sectionHead); root != (common.Hash{}) {
851
if tr, _ := trie.New(root, trieDb); tr != nil {
852
var encNumber [8]byte
853
binary.BigEndian.PutUint64(encNumber[:], req.BlockNum)
0 commit comments