aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 13:20:08 +0100
committertv <tv@krebsco.de>2026-11-01 13:20:08 +0100
commit7348524430ab2af7ccdcf38bfe76461b476337a5 (patch)
treecbf45f6f50d37c8ade4ca4f74382ecdae7c6cc9b /src/swarm
parent7a5a7408179c5fe9943bd2ce60295e86f1afaa40 (diff)
libp2p: revise published address count/selection
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/members.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/swarm/members.rs b/src/swarm/members.rs
index b3e2084..6be523c 100644
--- a/src/swarm/members.rs
+++ b/src/swarm/members.rs
@@ -120,8 +120,10 @@ fn addresses_path(pk: &str) -> Vec<String> {
path
}
-/// Addresses a member most likely has, at most: one per transport.
-const MAX_ADDRESSES: usize = 8;
+/// Addresses a member lists, at most: a few per transport (libp2p's up to
+/// `PUBLISHED_DIRECT` and `PUBLISHED_RELAYED`, and where it relays, again as many to
+/// reserve a slot at), taken in turns by transport (`Paths::local_addresses`).
+const MAX_ADDRESSES: usize = 16;
/// Where `pk` says it can be reached (at most `MAX_ADDRESSES`); none if its entry
/// doesn't say.