|
@ -296,10 +296,14 @@ void BlockChainSync::onPeerNewBlock(std::shared_ptr<EthereumPeer> _peer, RLP con |
|
|
|
|
|
|
|
|
case ImportResult::FutureTimeUnknown: |
|
|
case ImportResult::FutureTimeUnknown: |
|
|
case ImportResult::UnknownParent: |
|
|
case ImportResult::UnknownParent: |
|
|
|
|
|
{ |
|
|
logNewBlock(h); |
|
|
logNewBlock(h); |
|
|
clog(NetMessageDetail) << "Received block with no known parent. Resyncing..."; |
|
|
clog(NetMessageDetail) << "Received block with no known parent. Resyncing..."; |
|
|
resetSyncFor(_peer, h, _r[1].toInt<u256>()); |
|
|
u256 totalDifficulty = _r[1].toInt<u256>(); |
|
|
break; |
|
|
if (totalDifficulty > _peer->m_totalDifficulty) |
|
|
|
|
|
resetSyncFor(_peer, h, totalDifficulty); |
|
|
|
|
|
} |
|
|
|
|
|
break; |
|
|
default:; |
|
|
default:; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|