Browse Source

removed incorrect invariant checks (subject to race contition)

cl-refactor
arkpar 9 years ago
parent
commit
2a9b906cc3
  1. 8
      libethereum/BlockChainSync.cpp

8
libethereum/BlockChainSync.cpp

@ -791,10 +791,6 @@ bool PV60Sync::invariants() const
return false;
if (m_state == SyncState::Hashes)
{
bool hashes = false;
host().foreachPeer([&](std::shared_ptr<EthereumPeer> _p) { if (_p->m_asking == Asking::Hashes) hashes = true; return !hashes; });
if (!hashes)
return false;
if (!m_syncingLatestHash)
return false;
if (m_syncingNeededBlocks.empty() != (!m_syncingLastReceivedHash))
@ -802,10 +798,6 @@ bool PV60Sync::invariants() const
}
if (m_state == SyncState::Blocks || m_state == SyncState::NewBlocks)
{
bool blocks = false;
host().foreachPeer([&](std::shared_ptr<EthereumPeer> _p) { if (_p->m_asking == Asking::Blocks) blocks = true; return !blocks; });
if (!blocks)
return false;
if (downloadMan().isComplete())
return false;
}

Loading…
Cancel
Save