From f260bcce15c1ea33a152aba0560f3fbc309f3879 Mon Sep 17 00:00:00 2001 From: grumbach Date: Fri, 13 Dec 2024 14:50:26 +0900 Subject: [PATCH] feat: further expand close group get to close group x 1.5 --- ant-networking/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ant-networking/src/lib.rs b/ant-networking/src/lib.rs index c43cdcdf8e..434aa192ad 100644 --- a/ant-networking/src/lib.rs +++ b/ant-networking/src/lib.rs @@ -1111,7 +1111,8 @@ impl Network { ); } - let closest_peers = sort_peers_by_address(&closest_peers, key, CLOSE_GROUP_SIZE + 1)?; + let expanded_close_group = CLOSE_GROUP_SIZE + CLOSE_GROUP_SIZE / 2; + let closest_peers = sort_peers_by_address(&closest_peers, key, expanded_close_group)?; Ok(closest_peers.into_iter().cloned().collect()) }