|
|
|
@ -727,8 +727,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { |
|
|
|
|
// Schedule a sync if above ours. Note, this will not fire a sync for a gap of
|
|
|
|
|
// a single block (as the true TD is below the propagated block), however this
|
|
|
|
|
// scenario should easily be covered by the fetcher.
|
|
|
|
|
currentBlock := pm.blockchain.CurrentBlock() |
|
|
|
|
if trueTD.Cmp(pm.blockchain.GetTd(currentBlock.Hash(), currentBlock.NumberU64())) > 0 { |
|
|
|
|
currentHeader := pm.blockchain.CurrentHeader() |
|
|
|
|
if trueTD.Cmp(pm.blockchain.GetTd(currentHeader.Hash(), currentHeader.Number.Uint64())) > 0 { |
|
|
|
|
go pm.synchronise(p) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|