]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Drop the now-unused `push_blockable_mon_update`
authorMatt Corallo <git@bluematt.me>
Sun, 18 Jun 2023 23:18:34 +0000 (23:18 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 21 Jun 2023 22:37:50 +0000 (22:37 +0000)
lightning/src/ln/channel.rs

index df0ebcbd7a2e2f24c068798e553a84bc5237cdbd..26b70f286257a447ca0487819833c710303370df 100644 (file)
@@ -4449,22 +4449,14 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
                None
        }
 
-       /// Pushes a new monitor update into our monitor update queue, returning whether it should be
-       /// immediately given to the user for persisting or if it should be held as blocked.
-       fn push_blockable_mon_update(&mut self, update: ChannelMonitorUpdate) -> bool {
+       /// Pushes a new monitor update into our monitor update queue, returning it if it should be
+       /// immediately given to the user for persisting or `None` if it should be held as blocked.
+       fn push_ret_blockable_mon_update(&mut self, update: ChannelMonitorUpdate)
+       -> Option<ChannelMonitorUpdate> {
                let release_monitor = self.context.pending_monitor_updates.iter().all(|upd| !upd.blocked);
                self.context.pending_monitor_updates.push(PendingChannelMonitorUpdate {
-                       update, blocked: !release_monitor
+                       update, blocked: !release_monitor,
                });
-               release_monitor
-       }
-
-       /// Pushes a new monitor update into our monitor update queue, returning a reference to it if
-       /// it should be immediately given to the user for persisting or `None` if it should be held as
-       /// blocked.
-       fn push_ret_blockable_mon_update(&mut self, update: ChannelMonitorUpdate)
-       -> Option<ChannelMonitorUpdate> {
-               let release_monitor = self.push_blockable_mon_update(update);
                if release_monitor { self.context.pending_monitor_updates.last().map(|upd| upd.update.clone()) } else { None }
        }