Browse Source

fixed chain downloading over PV61

cl-refactor
arkpar 10 years ago
parent
commit
a9187870d6
  1. 7
      libethereum/EthereumHost.cpp

7
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);

Loading…
Cancel
Save