mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-14 08:29:31 +08:00
feat: cascade hord activation
This commit is contained in:
@@ -434,7 +434,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> {
|
||||
}
|
||||
|
||||
let mut service = Service::new(config, ctx);
|
||||
return service.run(predicates).await;
|
||||
return service.run(predicates, cmd.hord_disabled).await;
|
||||
}
|
||||
},
|
||||
Command::Config(subcmd) => match subcmd {
|
||||
|
||||
@@ -30,7 +30,7 @@ impl Service {
|
||||
Self { config, ctx }
|
||||
}
|
||||
|
||||
pub async fn run(&mut self, predicates: Vec<ChainhookFullSpecification>) -> Result<(), String> {
|
||||
pub async fn run(&mut self, predicates: Vec<ChainhookFullSpecification>, hord_disabled: bool) -> Result<(), String> {
|
||||
let mut chainhook_config = ChainhookConfig::new();
|
||||
|
||||
if predicates.is_empty() {
|
||||
@@ -87,6 +87,7 @@ impl Service {
|
||||
|
||||
let mut event_observer_config = self.config.get_event_observer_config();
|
||||
event_observer_config.chainhook_config = Some(chainhook_config);
|
||||
event_observer_config.ordinals_enabled = !hord_disabled;
|
||||
|
||||
info!(
|
||||
self.ctx.expect_logger(),
|
||||
|
||||
Reference in New Issue
Block a user