Browse Source

Merge pull request #2660 from arkpar/tq-fix

Fixed map access exception on sync restart
cl-refactor
Gav Wood 10 years ago
parent
commit
e63efbd1b7
  1. 8
      libethereum/BlockChainSync.cpp

8
libethereum/BlockChainSync.cpp

@ -1145,8 +1145,12 @@ void PV61Sync::onPeerAborting()
if (s->first.expired())
{
unsigned number = s->second;
m_readyChainMap[number] = move(m_downloadingChainMap.at(number));
m_downloadingChainMap.erase(number);
auto downloading = m_downloadingChainMap.find(number);
if (downloading != m_downloadingChainMap.end())
{
m_readyChainMap[number] = move(downloading->second);
m_downloadingChainMap.erase(number);
}
m_chainSyncPeers.erase(s++);
}
else

Loading…
Cancel
Save