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. 6
      libethereum/BlockChainSync.cpp

6
libethereum/BlockChainSync.cpp

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

Loading…
Cancel
Save