Browse Source

Minor optimisations.

cl-refactor
Gav Wood 10 years ago
parent
commit
91452da11d
  1. 2
      libethereum/BlockChain.cpp
  2. 2
      libethereum/Client.cpp

2
libethereum/BlockChain.cpp

@ -325,7 +325,7 @@ tuple<ImportRoute, bool, unsigned> BlockChain::sync(BlockQueue& _bq, OverlayDB c
{
// Nonce & uncle nonces already verified in verification thread at this point.
ImportRoute r;
DEV_TIMED_ABOVE("Block import", 500)
DEV_TIMED_ABOVE("Block import " + toString(block.verified.info.number), 500)
r = import(block.verified, _stateDB, ImportRequirements::Default & ~ImportRequirements::ValidNonce & ~ImportRequirements::CheckUncles);
fresh += r.liveBlocks;
dead += r.deadBlocks;

2
libethereum/Client.cpp

@ -89,7 +89,7 @@ void VersionChecker::setOk()
ImportResult Client::queueBlock(bytes const& _block, bool _isSafe)
{
if (m_bq.status().verified + m_bq.status().verifying + m_bq.status().unverified > 500)
if (m_bq.status().verified + m_bq.status().verifying + m_bq.status().unverified > 10000)
this_thread::sleep_for(std::chrono::milliseconds(500));
return m_bq.import(&_block, bc(), _isSafe);
}

Loading…
Cancel
Save