未验证 提交 95572718 编写于 作者: Z Zou Guangxian 提交者: GitHub

eth: fix corner case in sync head determination (#21695)

This avoids synchronisation failures when the local header is ahead of
the local full block.
上级 6477ea65
......@@ -289,8 +289,8 @@ func (cs *chainSyncer) modeAndLocalHead() (downloader.SyncMode, *big.Int) {
}
}
// Nope, we're really full syncing
head := cs.handler.chain.CurrentHeader()
td := cs.handler.chain.GetTd(head.Hash(), head.Number.Uint64())
head := cs.handler.chain.CurrentBlock()
td := cs.handler.chain.GetTd(head.Hash(), head.NumberU64())
return downloader.FullSync, td
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册