|
@@ -846,8 +846,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if header := pm.blockchain.GetHeaderByNumber(req.BlockNum); header != nil {
|
|
if header := pm.blockchain.GetHeaderByNumber(req.BlockNum); header != nil {
|
|
|
- sectionHead := core.GetCanonicalHash(pm.chainDb, (req.ChtNum+1)*light.ChtV1Frequency-1)
|
|
|
|
|
- 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{}) {
|
|
|
if tr, _ := trie.New(root, trieDb); tr != nil {
|
|
if tr, _ := trie.New(root, trieDb); tr != nil {
|
|
|
var encNumber [8]byte
|
|
var encNumber [8]byte
|
|
|
binary.BigEndian.PutUint64(encNumber[:], req.BlockNum)
|
|
binary.BigEndian.PutUint64(encNumber[:], req.BlockNum)
|