From 1539bef5ef6c572c34011fa1347f3419725110e3 Mon Sep 17 00:00:00 2001 From: MicaiahReid Date: Mon, 9 Oct 2023 16:59:11 -0400 Subject: [PATCH] fix: don't register confirmed/interrupted predicates on startup --- components/chainhook-cli/src/service/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/chainhook-cli/src/service/mod.rs b/components/chainhook-cli/src/service/mod.rs index 8752e51af..1fc423924 100644 --- a/components/chainhook-cli/src/service/mod.rs +++ b/components/chainhook-cli/src/service/mod.rs @@ -78,7 +78,11 @@ impl Service { }; leftover_scans.push((predicate.clone(), Some(scanning_data))); } - _ => {} + PredicateStatus::UnconfirmedExpiration(_) => {} + PredicateStatus::ConfirmedExpiration(_) | PredicateStatus::Interrupted(_) => { + // Confirmed and Interrupted predicates don't need to be reregistered. + continue; + } } match chainhook_config.register_specification(predicate) { Ok(_) => {