mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-03-30 17:48:03 -04:00
increase minimum number of nodes for bootstrap
This commit is contained in:
parent
f00e89114b
commit
d67ef0eb2c
@ -4,6 +4,7 @@ use futures_util::stream::{FuturesUnordered, StreamExt};
|
|||||||
use stop_token::future::FutureExt as StopFutureExt;
|
use stop_token::future::FutureExt as StopFutureExt;
|
||||||
|
|
||||||
pub const BOOTSTRAP_TXT_VERSION_0: u8 = 0;
|
pub const BOOTSTRAP_TXT_VERSION_0: u8 = 0;
|
||||||
|
pub const MIN_BOOTSTRAP_PEERS: usize = 4;
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct BootstrapRecord {
|
pub struct BootstrapRecord {
|
||||||
@ -345,7 +346,7 @@ impl RoutingTable {
|
|||||||
// Do we need to bootstrap this crypto kind?
|
// Do we need to bootstrap this crypto kind?
|
||||||
let eckey = (RoutingDomain::PublicInternet, crypto_kind);
|
let eckey = (RoutingDomain::PublicInternet, crypto_kind);
|
||||||
let cnt = entry_count.get(&eckey).copied().unwrap_or_default();
|
let cnt = entry_count.get(&eckey).copied().unwrap_or_default();
|
||||||
if cnt == 0 {
|
if cnt < MIN_BOOTSTRAP_PEERS {
|
||||||
crypto_kinds.push(crypto_kind);
|
crypto_kinds.push(crypto_kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user