@@ -13,10 +13,9 @@ use crate::service::runloops::start_bitcoin_scan_runloop;
13
13
14
14
use chainhook_sdk:: chainhooks:: types:: {
15
15
BitcoinChainhookSpecification , ChainhookConfig , ChainhookFullSpecification ,
16
+ ChainhookSpecification ,
16
17
} ;
17
18
18
- use chainhook_sdk:: chainhooks:: types:: ChainhookSpecification ;
19
- use chainhook_sdk:: chainhooks:: types:: { ChainhookConfig , ChainhookFullSpecification } ;
20
19
use chainhook_sdk:: observer:: { start_event_observer, ObserverEvent } ;
21
20
use chainhook_sdk:: utils:: Context ;
22
21
use chainhook_types:: { BitcoinBlockSignaling , BitcoinChainEvent } ;
@@ -39,7 +38,6 @@ impl Service {
39
38
pub async fn run (
40
39
& mut self ,
41
40
predicates : Vec < ChainhookFullSpecification > ,
42
- hord_disabled : bool ,
43
41
) -> Result < ( ) , String > {
44
42
let mut chainhook_config = ChainhookConfig :: new ( ) ;
45
43
@@ -129,29 +127,27 @@ impl Service {
129
127
let mut moved_event_observer_config = event_observer_config. clone ( ) ;
130
128
let moved_ctx = self . ctx . clone ( ) ;
131
129
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" ) ;
155
151
}
156
152
}
157
153
}
0 commit comments