]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add TxOut in DynamicOutput
authorAntoine Riard <ariard@student.42.fr>
Sun, 11 Nov 2018 20:59:03 +0000 (15:59 -0500)
committerAntoine Riard <ariard@student.42.fr>
Fri, 16 Nov 2018 00:07:34 +0000 (19:07 -0500)
src/chain/keysinterface.rs
src/ln/channelmonitor.rs

index 556be6dc5bbaa4c881ca58f12be762c28598ff54..7d669d9d701a055e40dbb3f0f8f65bba1db57c48 100644 (file)
@@ -50,6 +50,8 @@ pub enum SpendableOutputDescriptor {
                witness_script: Script,
                /// nSequence input must commit to self_delay to satisfy script's OP_CSV
                to_self_delay: u16,
+               /// The output which is referenced by the given outpoint
+               output: TxOut,
        }
 }
 
index 2bdbfec2cdcbcde5bbcac31aab00738b1cfb3945..9dfb6eebfb1fb54d45fefcbb0a2630b3c93f5d38 100644 (file)
@@ -1239,7 +1239,8 @@ impl ChannelMonitor {
                                                                outpoint: BitcoinOutPoint { txid: $father_tx.txid(), vout: $vout },
                                                                local_delayedkey,
                                                                witness_script: chan_utils::get_revokeable_redeemscript(&local_tx.revocation_key, self.our_to_self_delay, &local_tx.delayed_payment_key),
-                                                               to_self_delay: self.our_to_self_delay
+                                                               to_self_delay: self.our_to_self_delay,
+                                                               output: $father_tx.output[$vout as usize].clone(),
                                                        });
                                                }
                                        }