Browse Source

work around invalid NewBlock packet

cl-refactor
arkpar 10 years ago
parent
commit
56091064db
  1. 8
      libethereum/BlockChainSync.cpp

8
libethereum/BlockChainSync.cpp

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

Loading…
Cancel
Save