mirror of
https://github.com/monero-project/monero.git
synced 2026-01-27 14:54:40 +01: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:
@@ -285,9 +285,11 @@ namespace nodetool
|
|||||||
{
|
{
|
||||||
if(!vl.last_seen)
|
if(!vl.last_seen)
|
||||||
continue;
|
continue;
|
||||||
bs_head.push_back(vl);
|
|
||||||
if(cnt++ > depth)
|
if(cnt++ >= depth)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
bs_head.push_back(vl);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user