aboutsummaryrefslogtreecommitdiff
path: root/src/util/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/config.rs')
-rw-r--r--src/util/config.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/util/config.rs b/src/util/config.rs
index 08ece5b7..f1c5c019 100644
--- a/src/util/config.rs
+++ b/src/util/config.rs
@@ -6,8 +6,8 @@ use std::path::PathBuf;
use serde::de::Error as SerdeError;
use serde::{de, Deserialize};
-use netapp::NodeID;
use netapp::util::parse_and_resolve_peer_addr;
+use netapp::NodeID;
use crate::error::Error;
@@ -46,10 +46,6 @@ pub struct Config {
/// Consul service name to use
pub consul_service_name: Option<String>,
- /// Max number of concurrent RPC request
- #[serde(default = "default_max_concurrent_rpc_requests")]
- pub max_concurrent_rpc_requests: usize,
-
/// Sled cache size, in bytes
#[serde(default = "default_sled_cache_capacity")]
pub sled_cache_capacity: u64,
@@ -91,9 +87,6 @@ fn default_sled_cache_capacity() -> u64 {
fn default_sled_flush_every_ms() -> u64 {
2000
}
-fn default_max_concurrent_rpc_requests() -> usize {
- 12
-}
fn default_block_size() -> usize {
1048576
}
@@ -117,10 +110,11 @@ where
let mut ret = vec![];
for peer in <Vec<&str>>::deserialize(deserializer)? {
- let (pubkey, addrs) = parse_and_resolve_peer_addr(peer)
- .ok_or_else(|| D::Error::custom(format!("Unable to parse or resolve peer: {}", peer)))?;
+ let (pubkey, addrs) = parse_and_resolve_peer_addr(peer).ok_or_else(|| {
+ D::Error::custom(format!("Unable to parse or resolve peer: {}", peer))
+ })?;
for ip in addrs {
- ret.push((pubkey.clone(), ip));
+ ret.push((pubkey, ip));
}
}