mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 07:52:25 +00:00
Honor depth in get_peerlist_head method
The method returned depth + 2 because: - push_back was executed before the condition. - > instead of >= causing one more iteration.
This commit is contained in:
parent
2a2f02e375
commit
cbcdf8ad35
1 changed files with 4 additions and 2 deletions
|
@ -285,9 +285,11 @@ namespace nodetool
|
|||
{
|
||||
if(!vl.last_seen)
|
||||
continue;
|
||||
bs_head.push_back(vl);
|
||||
if(cnt++ > depth)
|
||||
|
||||
if(cnt++ >= depth)
|
||||
break;
|
||||
|
||||
bs_head.push_back(vl);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue