]> git.bitcoin.ninja Git - rust-lightning/commitdiff
(TODO: Needs test) Add missing SpendableOutputDescriptor in revoked-remote-tx-claim 2019-04-334-review
authorMatt Corallo <git@bluematt.me>
Sun, 14 Apr 2019 20:14:48 +0000 (16:14 -0400)
committerMatt Corallo <git@bluematt.me>
Sun, 14 Apr 2019 20:15:41 +0000 (16:15 -0400)
src/ln/channelmonitor.rs

index 0bc03ae6d0d008ae307052a3a84d261c71e5928d..034e7bfb956334f6412ec62b3663bba1051a93ce 100644 (file)
@@ -1214,6 +1214,11 @@ impl ChannelMonitor {
                                                        let sighash_parts = bip143::SighashComponents::new(&single_htlc_tx);
                                                        sign_input!(sighash_parts, single_htlc_tx.input[0], Some(idx), htlc.amount_msat / 1000);
                                                        assert!(predicted_weight >= single_htlc_tx.get_weight());
+
+                                                       spendable_outputs.push(SpendableOutputDescriptor::StaticOutput {
+                                                               outpoint: BitcoinOutPoint { txid: single_htlc_tx.txid(), vout: 0 },
+                                                               output: single_htlc_tx.output[0].clone(),
+                                                       });
                                                        txn_to_broadcast.push(single_htlc_tx);
                                                }
                                        }