Add optional publish-blocks option

This commit is contained in:
asonix
2020-03-21 23:50:14 -05:00
parent 82d837b963
commit d00961ae86
4 changed files with 36 additions and 12 deletions
+6
View File
@@ -16,6 +16,7 @@ pub struct Config {
https: bool,
database_url: String,
pretty_log: bool,
publish_blocks: bool,
}
pub enum UrlKind {
@@ -42,6 +43,7 @@ impl Config {
.set_default("validate_signatures", false)?
.set_default("https", false)?
.set_default("pretty_log", true)?
.set_default("publish_blocks", false)?
.merge(Environment::new())?;
Ok(config.try_into()?)
@@ -79,6 +81,10 @@ impl Config {
self.debug
}
pub fn publish_blocks(&self) -> bool {
self.publish_blocks
}
pub fn whitelist_mode(&self) -> bool {
self.whitelist_mode
}