Expose HTLC transaction locktime in BumpTransactionEvent::HTLCResolution
[rust-lightning] / lightning / src / chain / onchaintx.rs
index c95aec9774a09481554ba5e89f6c1f29a97570c1..f690d3664273b94e8ee9fe8d6d4c9f16d44ece0e 100644 (file)
@@ -12,6 +12,8 @@
 //! OnchainTxHandler objects are fully-part of ChannelMonitor and encapsulates all
 //! building, tracking, bumping and notifications functions.
 
+#[cfg(anchors)]
+use bitcoin::PackedLockTime;
 use bitcoin::blockdata::transaction::Transaction;
 use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint;
 use bitcoin::blockdata::script::Script;
@@ -201,6 +203,7 @@ pub(crate) enum ClaimEvent {
        BumpHTLC {
                target_feerate_sat_per_1000_weight: u32,
                htlcs: Vec<ExternalHTLCClaim>,
+               tx_lock_time: PackedLockTime,
        },
 }
 
@@ -544,6 +547,7 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
                                                        OnchainClaim::Event(ClaimEvent::BumpHTLC {
                                                                target_feerate_sat_per_1000_weight,
                                                                htlcs,
+                                                               tx_lock_time: PackedLockTime(cached_request.package_locktime(cur_height)),
                                                        }),
                                                ));
                                        } else {