From f88f826b28e6bd784b3ed771ece29a93b5e43f24 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Sun, 11 Nov 2018 15:59:03 -0500 Subject: [PATCH] Add TxOut in DynamicOutput --- src/chain/keysinterface.rs | 2 ++ src/ln/channelmonitor.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chain/keysinterface.rs b/src/chain/keysinterface.rs index 556be6dc5..7d669d9d7 100644 --- a/src/chain/keysinterface.rs +++ b/src/chain/keysinterface.rs @@ -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, } } diff --git a/src/ln/channelmonitor.rs b/src/ln/channelmonitor.rs index 2bdbfec2c..9dfb6eebf 100644 --- a/src/ln/channelmonitor.rs +++ b/src/ln/channelmonitor.rs @@ -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(), }); } } -- 2.39.5