print max

This commit is contained in:
Christien Rioux 2023-09-10 20:36:39 -04:00
parent b3294d905d
commit 5b3d589bf2
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
use super::*;
use weak_table::PtrWeakHashSet;
const RECENT_PEERS_TABLE_SIZE: usize = 64;
pub const RECENT_PEERS_TABLE_SIZE: usize = 64;
pub type EntryCounts = BTreeMap<(RoutingDomain, CryptoKind), usize>;
//////////////////////////////////////////////////////////////////////////

View File

@ -687,7 +687,11 @@ impl VeilidAPI {
// Dump core state
let state = self.get_state().await?;
let mut peertable = format!("Recent Peers: {}\n", state.network.peers.len());
let mut peertable = format!(
"Recent Peers: {} (max {})\n",
state.network.peers.len(),
RECENT_PEERS_TABLE_SIZE
);
for peer in state.network.peers {
peertable += &format!(
" {} | {} | {} | {} down | {} up\n",