mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-07-01 10:06:52 -04:00
increase minimum number of nodes for bootstrap
This commit is contained in:
parent
f00e89114b
commit
d67ef0eb2c
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ use futures_util::stream::{FuturesUnordered, StreamExt};
|
|||
use stop_token::future::FutureExt as StopFutureExt;
|
||||
|
||||
pub const BOOTSTRAP_TXT_VERSION_0: u8 = 0;
|
||||
pub const MIN_BOOTSTRAP_PEERS: usize = 4;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct BootstrapRecord {
|
||||
|
@ -345,7 +346,7 @@ impl RoutingTable {
|
|||
// Do we need to bootstrap this crypto kind?
|
||||
let eckey = (RoutingDomain::PublicInternet, crypto_kind);
|
||||
let cnt = entry_count.get(&eckey).copied().unwrap_or_default();
|
||||
if cnt == 0 {
|
||||
if cnt < MIN_BOOTSTRAP_PEERS {
|
||||
crypto_kinds.push(crypto_kind);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue