1
1
use crate :: config:: Config ;
2
- use crate :: scan:: bitcoin:: scan_bitcoin_chain_with_predicate;
3
- use chainhook_event_observer:: bitcoincore_rpc:: jsonrpc;
4
- use chainhook_event_observer:: chainhooks:: bitcoin:: {
5
- handle_bitcoin_hook_action, BitcoinChainhookOccurrence , BitcoinTriggerChainhook ,
6
- } ;
2
+ use crate :: scan:: bitcoin:: scan_bitcoin_chain_with_predicate_via_http;
3
+
4
+
7
5
use chainhook_event_observer:: chainhooks:: types:: {
8
- BitcoinPredicateType , ChainhookConfig , ChainhookFullSpecification , OrdinalOperations , Protocols ,
9
- } ;
10
- use chainhook_event_observer:: hord:: db:: {
11
- find_all_inscriptions, find_all_inscriptions_block_heights,
6
+ ChainhookConfig , ChainhookFullSpecification ,
12
7
} ;
13
- use chainhook_event_observer:: indexer;
8
+
9
+
14
10
use chainhook_event_observer:: observer:: { start_event_observer, ApiKey , ObserverEvent } ;
15
- use chainhook_event_observer:: utils:: { file_append , send_request , Context } ;
11
+ use chainhook_event_observer:: utils:: { Context } ;
16
12
use chainhook_event_observer:: {
17
13
chainhooks:: stacks:: {
18
14
evaluate_stacks_predicate_on_transaction, handle_stacks_hook_action,
@@ -25,10 +21,10 @@ use chainhook_types::{
25
21
StacksTransactionData ,
26
22
} ;
27
23
use redis:: { Commands , Connection } ;
28
- use reqwest :: Client as HttpClient ;
29
- use std:: collections:: { BTreeMap , HashMap , HashSet } ;
24
+
25
+ use std:: collections:: { HashMap } ;
30
26
use std:: sync:: mpsc:: channel;
31
- use std :: time :: Duration ;
27
+
32
28
33
29
pub const DEFAULT_INGESTION_PORT : u16 = 20455 ;
34
30
pub const DEFAULT_CONTROL_PORT : u16 = 20456 ;
@@ -317,7 +313,7 @@ impl Service {
317
313
info ! ( self . ctx. expect_logger( ) , "Stacks chainhook {} scan completed: action triggered by {} transactions" , stacks_hook. uuid, total_hits) ;
318
314
}
319
315
ChainhookSpecification :: Bitcoin ( predicate_spec) => {
320
- match scan_bitcoin_chain_with_predicate (
316
+ match scan_bitcoin_chain_with_predicate_via_http (
321
317
predicate_spec,
322
318
& self . config ,
323
319
& self . ctx ,
@@ -328,7 +324,7 @@ impl Service {
328
324
Err ( e) => {
329
325
info ! (
330
326
self . ctx. expect_logger( ) ,
331
- "Unable to evaluate predicate on the bitcoin chainstate: {e}" ,
327
+ "Unable to evaluate predicate on Bitcoin chainstate: {e}" ,
332
328
) ;
333
329
}
334
330
} ;
0 commit comments