Browse Source

Don't stop syncing when a random bad block comes in the queue.

cl-refactor
Gav Wood 10 years ago
parent
commit
0ecb5a67ea
  1. 5
      libethereum/BlockChain.cpp

5
libethereum/BlockChain.cpp

@ -384,9 +384,6 @@ tuple<ImportRoute, bool, unsigned> BlockChain::sync(BlockQueue& _bq, OverlayDB c
Transactions goodTransactions; Transactions goodTransactions;
unsigned count = 0; unsigned count = 0;
for (VerifiedBlock const& block: blocks) for (VerifiedBlock const& block: blocks)
if (!badBlocks.empty())
badBlocks.push_back(block.verified.info.hash());
else
{ {
do { do {
try try
@ -421,7 +418,7 @@ tuple<ImportRoute, bool, unsigned> BlockChain::sync(BlockQueue& _bq, OverlayDB c
} }
catch (Exception& ex) catch (Exception& ex)
{ {
// cnote << "Exception while importing block. Someone (Jeff? That you?) seems to be giving us dodgy blocks!";// << LogTag::Error << diagnostic_information(ex); // cnote << "Exception while importing block. Someone (Jeff? That you?) seems to be giving us dodgy blocks!";// << LogTag::Error << diagnostic_information(ex);
if (m_onBad) if (m_onBad)
m_onBad(ex); m_onBad(ex);
// NOTE: don't reimport since the queue should guarantee everything in the right order. // NOTE: don't reimport since the queue should guarantee everything in the right order.

Loading…
Cancel
Save