Skip to content

Commit

Permalink
Merge pull request #1946 from MonsieurNicolas/peersListFix
Browse files Browse the repository at this point in the history
fix: crash in PeerManager::getPeersToSend

Reviewed-by: marta-lokhova
  • Loading branch information
latobarita committed Feb 4, 2019
2 parents d6661f7 + 54ae9f2 commit e7a1c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/overlay/PeerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ PeerManager::getPeersToSend(int size, PeerBareAddress const& address)
if (peers.size() < size)
{
auto inbound =
mInboundPeersToSend->getRandomPeers(peers.size() - size, keep);
mInboundPeersToSend->getRandomPeers(size - peers.size(), keep);

This comment has been minimized.

Copy link
@choza13

choza13 Feb 4, 2019

100000

std::copy(std::begin(inbound), std::end(inbound),
std::back_inserter(peers));
}
Expand Down

0 comments on commit e7a1c01

Please sign in to comment.