]> git.bitcoin.ninja Git - rust-lightning/blobdiff - lightning/src/ln/channelmonitor.rs
Dont forget RBF previous-feerate info if tx size changed.
[rust-lightning] / lightning / src / ln / channelmonitor.rs
index 6ca9578b9a4beb1e715a5282a402b7ed75a951c7..ed532e1f025e0a5e6355bbc4585de507449e3a35 100644 (file)
@@ -1977,6 +1977,7 @@ impl ChannelMonitor {
 
        /// Attempts to claim a remote HTLC-Success/HTLC-Timeout's outputs using the revocation key
        fn check_spend_remote_htlc(&mut self, tx: &Transaction, commitment_number: u64, height: u32, fee_estimator: &FeeEstimator) -> (Option<Transaction>, Option<SpendableOutputDescriptor>) {
+               //TODO: send back new outputs to guarantee pending_claim_request consistency
                if tx.input.len() != 1 || tx.output.len() != 1 {
                        return (None, None)
                }
@@ -2420,8 +2421,6 @@ impl ChannelMonitor {
                                                                        claimed_input_material.push(input_material);
                                                                }
                                                        }
-                                                       // Avoid bump engine using inaccurate feerate due to new transaction size
-                                                       claim_material.feerate_previous = 0;
                                                        //TODO: recompute soonest_timelock to avoid wasting a bit on fees
                                                        bump_candidates.push((ancestor_claimable_txid.0.clone(), claim_material.clone()));
                                                }
@@ -2518,8 +2517,6 @@ impl ChannelMonitor {
                                        OnchainEvent::ContentiousOutpoint { outpoint, input_material } => {
                                                if let Some(ancestor_claimable_txid) = self.claimable_outpoints.get(&outpoint) {
                                                        if let Some(claim_material) = self.pending_claim_requests.get_mut(&ancestor_claimable_txid.0) {
-                                                               // Avoid bump engine using inaccurate feerate due to new transaction size
-                                                               claim_material.feerate_previous = 0;
                                                                claim_material.per_input_material.insert(outpoint, input_material);
                                                                // Using a HashMap guarantee us than if we have multiple outpoints getting
                                                                // resurrected only one bump claim tx is going to be broadcast