Skip to content

Commit b78c0cc

Browse files
author
Ludo Galabru
committed
fix: build error
1 parent 03442f6 commit b78c0cc

File tree

2 files changed

+23
-27
lines changed

2 files changed

+23
-27
lines changed

components/hord-cli/src/cli/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> {
330330
info!(ctx.expect_logger(), "Starting service...",);
331331

332332
let mut service = Service::new(config, ctx);
333-
return service.run(predicates, cmd.hord_disabled).await;
333+
return service.run(predicates).await;
334334
}
335335
},
336336
Command::Config(subcmd) => match subcmd {

components/hord-cli/src/service/mod.rs

+22-26
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ use crate::service::runloops::start_bitcoin_scan_runloop;
1313

1414
use chainhook_sdk::chainhooks::types::{
1515
BitcoinChainhookSpecification, ChainhookConfig, ChainhookFullSpecification,
16+
ChainhookSpecification,
1617
};
1718

18-
use chainhook_sdk::chainhooks::types::ChainhookSpecification;
19-
use chainhook_sdk::chainhooks::types::{ChainhookConfig, ChainhookFullSpecification};
2019
use chainhook_sdk::observer::{start_event_observer, ObserverEvent};
2120
use chainhook_sdk::utils::Context;
2221
use chainhook_types::{BitcoinBlockSignaling, BitcoinChainEvent};
@@ -39,7 +38,6 @@ impl Service {
3938
pub async fn run(
4039
&mut self,
4140
predicates: Vec<ChainhookFullSpecification>,
42-
hord_disabled: bool,
4341
) -> Result<(), String> {
4442
let mut chainhook_config = ChainhookConfig::new();
4543

@@ -129,29 +127,27 @@ impl Service {
129127
let mut moved_event_observer_config = event_observer_config.clone();
130128
let moved_ctx = self.ctx.clone();
131129

132-
let _ = hiro_system_kit::thread_named("Initial predicate processing")
133-
.spawn(move || {
134-
if let Some(mut chainhook_config) =
135-
moved_event_observer_config.chainhook_config.take()
136-
{
137-
let mut bitcoin_predicates_ref: Vec<&BitcoinChainhookSpecification> =
138-
vec![];
139-
for bitcoin_predicate in chainhook_config.bitcoin_chainhooks.iter_mut()
140-
{
141-
bitcoin_predicate.enabled = false;
142-
bitcoin_predicates_ref.push(bitcoin_predicate);
143-
}
144-
while let Ok(block) = rx.recv() {
145-
let future = process_block_with_predicates(
146-
block,
147-
&bitcoin_predicates_ref,
148-
&moved_event_observer_config,
149-
&moved_ctx,
150-
);
151-
let res = hiro_system_kit::nestable_block_on(future);
152-
if let Err(_) = res {
153-
error!(moved_ctx.expect_logger(), "Initial ingestion failing");
154-
}
130+
let _ = hiro_system_kit::thread_named("Initial predicate processing")
131+
.spawn(move || {
132+
if let Some(mut chainhook_config) =
133+
moved_event_observer_config.chainhook_config.take()
134+
{
135+
let mut bitcoin_predicates_ref: Vec<&BitcoinChainhookSpecification> =
136+
vec![];
137+
for bitcoin_predicate in chainhook_config.bitcoin_chainhooks.iter_mut() {
138+
bitcoin_predicate.enabled = false;
139+
bitcoin_predicates_ref.push(bitcoin_predicate);
140+
}
141+
while let Ok(block) = rx.recv() {
142+
let future = process_block_with_predicates(
143+
block,
144+
&bitcoin_predicates_ref,
145+
&moved_event_observer_config,
146+
&moved_ctx,
147+
);
148+
let res = hiro_system_kit::nestable_block_on(future);
149+
if let Err(_) = res {
150+
error!(moved_ctx.expect_logger(), "Initial ingestion failing");
155151
}
156152
}
157153
}

0 commit comments

Comments
 (0)