]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove per_input_material introduce in commit 0011713
authorAntoine Riard <ariard@student.42.fr>
Sat, 21 Mar 2020 19:48:11 +0000 (15:48 -0400)
committerAntoine Riard <ariard@student.42.fr>
Fri, 17 Apr 2020 21:43:50 +0000 (17:43 -0400)
Caching of input material for HTLC transaction was introducted
prevently but since then API (InputMaterial) has changed
between ChannelMonitor and OnchainTxHandler

lightning/src/ln/channelmonitor.rs

index 4bdc566745cf571499359cfd493f53a3c9081ce0..fa5e359027a4ce1b1c30cb690b6dfc4380308410 100644 (file)
@@ -1708,9 +1708,6 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
                                                        Err(_) => continue,
                                                };
 
-                                               let mut per_input_material = HashMap::with_capacity(1);
-                                               per_input_material.insert(htlc_timeout_tx.input[0].previous_output, InputMaterial::LocalHTLC { witness_script: htlc_script, sigs: (*their_sig, our_sig), preimage: None, amount: htlc.amount_msat / 1000});
-                                               //TODO: with option_simplified_commitment track outpoint too
                                                log_trace!(self, "Outpoint {}:{} is being being claimed", htlc_timeout_tx.input[0].previous_output.vout, htlc_timeout_tx.input[0].previous_output.txid);
                                                res.push(htlc_timeout_tx);
                                        } else {
@@ -1723,9 +1720,6 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
                                                                Err(_) => continue,
                                                        };
 
-                                                       let mut per_input_material = HashMap::with_capacity(1);
-                                                       per_input_material.insert(htlc_success_tx.input[0].previous_output, InputMaterial::LocalHTLC { witness_script: htlc_script, sigs: (*their_sig, our_sig), preimage: Some(*payment_preimage), amount: htlc.amount_msat / 1000});
-                                                       //TODO: with option_simplified_commitment track outpoint too
                                                        log_trace!(self, "Outpoint {}:{} is being being claimed", htlc_success_tx.input[0].previous_output.vout, htlc_success_tx.input[0].previous_output.txid);
                                                        res.push(htlc_success_tx);
                                                }