diff --git a/libethereum/EthereumHost.cpp b/libethereum/EthereumHost.cpp index 02fac5541..c76fcf82c 100644 --- a/libethereum/EthereumHost.cpp +++ b/libethereum/EthereumHost.cpp @@ -254,10 +254,7 @@ void EthereumHost::onPeerStatus(EthereumPeer* _peer) estimatePeerHashes(_peer); else { - if (_peer->m_latestBlockNumber > m_chain.number()) - _peer->m_expectedHashes = (unsigned)_peer->m_latestBlockNumber - m_chain.number() + 1000; - else - _peer->m_expectedHashes = 1000; + _peer->m_expectedHashes = (unsigned)_peer->m_latestBlockNumber - m_chain.number(); if (m_hashMan.chainSize() < _peer->m_expectedHashes) m_hashMan.resetToRange(m_chain.number() + 1, _peer->m_expectedHashes); } @@ -295,7 +292,7 @@ void EthereumHost::onPeerHashes(EthereumPeer* _peer, h256s const& _hashes, bool } bool syncByNumber = _peer->m_syncHashNumber; - if (!syncByNumber && _peer->m_latestHash != m_syncingLatestHash) + if (!syncByNumber && _peer->m_syncHash != m_syncingLatestHash) { // Obsolete hashes, discard continueSync(_peer);