From: Matt Corallo Date: Wed, 22 Jul 2020 18:25:16 +0000 (-0400) Subject: Bump nodes_buff prealloc to match current avg char/line X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b6fd38119297bf900c9961fcb60b5898656984f9;p=dnsseed-rust Bump nodes_buff prealloc to match current avg char/line --- diff --git a/src/datastore.rs b/src/datastore.rs index 5aa4748..0b608f9 100644 --- a/src/datastore.rs +++ b/src/datastore.rs @@ -470,7 +470,7 @@ impl Store { let mut nodes_buff = String::new(); { let nodes = self.nodes.read().unwrap(); - nodes_buff.reserve(nodes.nodes_to_state.len() * 20); + nodes_buff.reserve(nodes.nodes_to_state.len() * 32); for (ref sockaddr, ref node) in nodes.nodes_to_state.iter() { nodes_buff += &sockaddr.to_string(); nodes_buff += ",";