Clean db code, switch to deadpool
This commit is contained in:
+4
-4
@@ -17,7 +17,7 @@ pub struct Config {
|
||||
database_url: String,
|
||||
pretty_log: bool,
|
||||
publish_blocks: bool,
|
||||
connections_per_core: u32,
|
||||
max_connections: usize,
|
||||
}
|
||||
|
||||
pub enum UrlKind {
|
||||
@@ -46,7 +46,7 @@ impl Config {
|
||||
.set_default("https", false)?
|
||||
.set_default("pretty_log", true)?
|
||||
.set_default("publish_blocks", false)?
|
||||
.set_default("connections_per_core", 2)?
|
||||
.set_default("max_connections", 2)?
|
||||
.merge(Environment::new())?;
|
||||
|
||||
Ok(config.try_into()?)
|
||||
@@ -56,8 +56,8 @@ impl Config {
|
||||
self.pretty_log
|
||||
}
|
||||
|
||||
pub fn connections_per_core(&self) -> u32 {
|
||||
self.connections_per_core
|
||||
pub fn max_connections(&self) -> usize {
|
||||
self.max_connections
|
||||
}
|
||||
|
||||
pub fn validate_signatures(&self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user