From f4fe4509218dcd2f1e757d31daef3e7af3926882 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Thu, 10 Oct 2024 17:16:18 +0200 Subject: [PATCH] Fix `synchronize_listeners` calling default implementation Previously, the `ChainListenerSet` `Listen` implementation wouldn't forward to the listeners `block_connected` implementation outside of tests. This would result in the default implementation of `Listen::block_connected` being used and the listeners implementation never being called. --- lightning-block-sync/src/init.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/lightning-block-sync/src/init.rs b/lightning-block-sync/src/init.rs index ae69518ce..430cda092 100644 --- a/lightning-block-sync/src/init.rs +++ b/lightning-block-sync/src/init.rs @@ -239,8 +239,6 @@ impl<'a, L: chain::Listen + ?Sized> chain::Listen for DynamicChainListener<'a, L struct ChainListenerSet<'a, L: chain::Listen + ?Sized>(Vec<(u32, &'a L)>); impl<'a, L: chain::Listen + ?Sized> chain::Listen for ChainListenerSet<'a, L> { - // Needed to differentiate test expectations. - #[cfg(test)] fn block_connected(&self, block: &bitcoin::Block, height: u32) { for (starting_height, chain_listener) in self.0.iter() { if height > *starting_height { -- 2.39.5