Optimize ChannelMonitor persistence on block connections.
[rust-lightning] / lightning / src / chain / onchaintx.rs
index e5757cfd1e52f5b1da358f4fd88a706052447147..07a75361d67678a8c7011e18c09c805817e5e53d 100644 (file)
@@ -535,6 +535,13 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
                }
        }
 
+       /// Returns true if we are currently tracking any pending claim requests that are not fully 
+       /// confirmed yet.
+       pub(super) fn has_pending_claims(&self) -> bool
+       {
+               self.pending_claim_requests.len() != 0
+       }
+
        /// Lightning security model (i.e being able to redeem/timeout HTLC or penalize counterparty
        /// onchain) lays on the assumption of claim transactions getting confirmed before timelock
        /// expiration (CSV or CLTV following cases). In case of high-fee spikes, claim tx may get stuck