diff --git a/components/chainhook-cli/src/config/mod.rs b/components/chainhook-cli/src/config/mod.rs index 039ff97fb..7db407523 100644 --- a/components/chainhook-cli/src/config/mod.rs +++ b/components/chainhook-cli/src/config/mod.rs @@ -109,7 +109,6 @@ impl Config { pub fn get_event_observer_config(&self) -> EventObserverConfig { EventObserverConfig { bitcoin_rpc_proxy_enabled: true, - event_handlers: vec![], chainhook_config: None, ingestion_port: DEFAULT_INGESTION_PORT, bitcoind_rpc_username: self.network.bitcoind_rpc_username.clone(), diff --git a/components/chainhook-sdk/src/indexer/fork_scratch_pad.rs b/components/chainhook-sdk/src/indexer/fork_scratch_pad.rs index 0c040c134..ca32bba7c 100644 --- a/components/chainhook-sdk/src/indexer/fork_scratch_pad.rs +++ b/components/chainhook-sdk/src/indexer/fork_scratch_pad.rs @@ -31,9 +31,9 @@ impl ForkScratchPad { pub fn can_process_header(&self, header: &BlockHeader) -> bool { if self.headers_store.is_empty() { - return true + return true; } - + self.headers_store .contains_key(&header.parent_block_identifier) } diff --git a/components/chainhook-sdk/src/observer/mod.rs b/components/chainhook-sdk/src/observer/mod.rs index a976a1bcd..df23772a7 100644 --- a/components/chainhook-sdk/src/observer/mod.rs +++ b/components/chainhook-sdk/src/observer/mod.rs @@ -1123,8 +1123,6 @@ pub async fn start_observer_commands_handler( } }; - for event_handler in event_handlers.iter() { - event_handler.propagate_bitcoin_event(&chain_event).await; } // process hooks let mut hooks_ids_to_deregister = vec![]; @@ -1275,9 +1273,6 @@ pub async fn start_observer_commands_handler( ctx.try_log(|logger| { slog::info!(logger, "Handling PropagateStacksChainEvent command") }); - for event_handler in event_handlers.iter() { - event_handler.propagate_stacks_event(&chain_event).await; - } let mut hooks_ids_to_deregister = vec![]; let mut requests = vec![]; let mut report = PredicateEvaluationReport::new(); @@ -1481,9 +1476,6 @@ pub async fn start_observer_commands_handler( ctx.try_log(|logger| { slog::info!(logger, "Handling NotifyBitcoinTransactionProxied command") }); - for event_handler in event_handlers.iter() { - event_handler.notify_bitcoin_transaction_proxied().await; - } if let Some(ref tx) = observer_events_tx { let _ = tx.send(ObserverEvent::NotifyBitcoinTransactionProxied); } diff --git a/components/chainhook-sdk/src/observer/tests/mod.rs b/components/chainhook-sdk/src/observer/tests/mod.rs index 8d4b3a7f1..72a15cdd7 100644 --- a/components/chainhook-sdk/src/observer/tests/mod.rs +++ b/components/chainhook-sdk/src/observer/tests/mod.rs @@ -30,7 +30,6 @@ fn generate_test_config() -> (EventObserverConfig, ChainhookStore) { let config: EventObserverConfig = EventObserverConfig { chainhook_config: Some(ChainhookConfig::new()), bitcoin_rpc_proxy_enabled: false, - event_handlers: vec![], ingestion_port: 0, bitcoind_rpc_username: "user".into(), bitcoind_rpc_password: "user".into(),