Skip to content

Commit

Permalink
fix: remove event_handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludo Galabru committed Aug 22, 2023
1 parent 2755266 commit 6fecfd2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion components/chainhook-cli/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions components/chainhook-sdk/src/indexer/fork_scratch_pad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
8 changes: 0 additions & 8 deletions components/chainhook-sdk/src/observer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![];
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion components/chainhook-sdk/src/observer/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 6fecfd2

Please sign in to comment.