From 29e0e8150c9b979b2672ad257a628a82ef31e68c Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 30 Apr 2024 15:05:57 +0200 Subject: [PATCH] feat: add with_canon_state_notification_sender fn (#7997) --- crates/blockchain-tree/src/blockchain_tree.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/blockchain-tree/src/blockchain_tree.rs b/crates/blockchain-tree/src/blockchain_tree.rs index b98cc664a..eee4163c7 100644 --- a/crates/blockchain-tree/src/blockchain_tree.rs +++ b/crates/blockchain-tree/src/blockchain_tree.rs @@ -156,6 +156,18 @@ where }) } + /// Replaces the canon state notification sender. + /// + /// Caution: this will close any existing subscriptions to the previous sender. + #[doc(hidden)] + pub fn with_canon_state_notification_sender( + mut self, + canon_state_notification_sender: CanonStateNotificationSender, + ) -> Self { + self.canon_state_notification_sender = canon_state_notification_sender; + self + } + /// Set the sync metric events sender. /// /// A transmitter for sending synchronization metrics. This is used for monitoring the node's