Skip to content

Commit

Permalink
Add silent_payments_index config option
Browse files Browse the repository at this point in the history
  • Loading branch information
jlest01 committed Aug 25, 2024
1 parent bdf26d1 commit 4e65557
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/config_specification.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,7 @@ doc = "Logging filters, overriding `RUST_LOG` environment variable (see https://
name = "signet_magic"
type = "String"
doc = "network magic for custom signet network in hex format, as found in Bitcoin Core logs (signet only)"

[[switch]]
name = "silent_payments_index"
doc = "Enable silent payments index."
2 changes: 2 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ pub struct Config {
pub disable_electrum_rpc: bool,
pub server_banner: String,
pub signet_magic: Magic,
pub silent_payments_index: bool,
}

pub struct SensitiveAuth(pub Auth);
Expand Down Expand Up @@ -368,6 +369,7 @@ impl Config {
disable_electrum_rpc: config.disable_electrum_rpc,
server_banner: config.server_banner,
signet_magic: magic,
silent_payments_index: config.silent_payments_index,
};
eprintln!(
"Starting electrs {} on {} {} with {:?}",
Expand Down
2 changes: 2 additions & 0 deletions src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct Tracker {
mempool: Mempool,
metrics: Metrics,
ignore_mempool: bool,
silent_payments_index: bool,
}

pub(crate) enum Error {
Expand Down Expand Up @@ -52,6 +53,7 @@ impl Tracker {
mempool: Mempool::new(&metrics),
metrics,
ignore_mempool: config.ignore_mempool,
silent_payments_index: config.silent_payments_index,
})
}

Expand Down

0 comments on commit 4e65557

Please sign in to comment.