Skip to content

Commit

Permalink
Fix count in get_peerlist_head
Browse files Browse the repository at this point in the history
  • Loading branch information
aivve committed Dec 10, 2020
1 parent 42669ef commit 0971fb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/P2p/PeerListManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ bool PeerlistManager::get_peerlist_head(std::list<PeerlistEntry>& bs_head, uint3

BOOST_REVERSE_FOREACH(const peers_indexed::value_type& vl, by_time_index)
{
if (cnt++ > depth)
break;

if (!vl.last_seen)
continue;

bs_head.push_back(vl);
if (cnt++ > depth)
break;
}
return true;
}
Expand Down

0 comments on commit 0971fb6

Please sign in to comment.