diff --git a/libethereum/BlockChainSync.cpp b/libethereum/BlockChainSync.cpp index 64de5f590..c8c81c37f 100644 --- a/libethereum/BlockChainSync.cpp +++ b/libethereum/BlockChainSync.cpp @@ -225,8 +225,11 @@ void BlockChainSync::onPeerBlocks(EthereumPeer* _peer, RLP const& _r) } if (m_state == SyncState::NewBlocks && unknown > 0) + { + completeSync(); resetSyncFor(_peer, maxUnknown, std::numeric_limits::max()); //TODO: proper total difficuty - else if (m_state == SyncState::Blocks || m_state == SyncState::NewBlocks) + } + if (m_state == SyncState::Blocks || m_state == SyncState::NewBlocks) { if (downloadMan().isComplete()) completeSync();