From: Antoine Riard Date: Sat, 21 Mar 2020 19:48:11 +0000 (-0400) Subject: Remove per_input_material introduce in commit 0011713 X-Git-Tag: v0.0.12~84^2~10 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=7e395e0265c8cad41dd23ba4d6804c158cbba99e;p=rust-lightning Remove per_input_material introduce in commit 0011713 Caching of input material for HTLC transaction was introducted prevently but since then API (InputMaterial) has changed between ChannelMonitor and OnchainTxHandler --- diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 4bdc56674..fa5e35902 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -1708,9 +1708,6 @@ impl ChannelMonitor { 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 ChannelMonitor { 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); }