From a9187870d67d4628af64cbe4a282d058281620c1 Mon Sep 17 00:00:00 2001 From: arkpar Date: Tue, 9 Jun 2015 10:34:54 +0200 Subject: [PATCH] fixed chain downloading over PV61 --- libethereum/EthereumHost.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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);