@@ -879,6 +879,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: EcdsaChannelSigner> {
879
879
holder_revocation_basepoint : RevocationBasepoint ,
880
880
channel_id : ChannelId ,
881
881
funding_info : ( OutPoint , ScriptBuf ) ,
882
+ original_funding_txo : OutPoint ,
882
883
current_counterparty_commitment_txid : Option < Txid > ,
883
884
prev_counterparty_commitment_txid : Option < Txid > ,
884
885
@@ -1246,6 +1247,7 @@ impl<Signer: EcdsaChannelSigner> Writeable for ChannelMonitorImpl<Signer> {
1246
1247
( 21 , self . balances_empty_height, option) ,
1247
1248
( 23 , self . holder_pays_commitment_tx_fee, option) ,
1248
1249
( 25 , self . payment_preimages, required) ,
1250
+ ( 27 , self . original_funding_txo, required) ,
1249
1251
} ) ;
1250
1252
1251
1253
Ok ( ( ) )
@@ -1398,6 +1400,8 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
1398
1400
let mut outputs_to_watch = new_hash_map ( ) ;
1399
1401
outputs_to_watch. insert ( funding_info. 0 . txid , vec ! [ ( funding_info. 0 . index as u32 , funding_info. 1 . clone( ) ) ] ) ;
1400
1402
1403
+ let original_funding_txo = funding_info. 0 ;
1404
+
1401
1405
Self :: from_impl ( ChannelMonitorImpl {
1402
1406
latest_update_id : 0 ,
1403
1407
commitment_transaction_number_obscure_factor,
@@ -1411,6 +1415,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
1411
1415
holder_revocation_basepoint,
1412
1416
channel_id,
1413
1417
funding_info,
1418
+ original_funding_txo,
1414
1419
current_counterparty_commitment_txid : None ,
1415
1420
prev_counterparty_commitment_txid : None ,
1416
1421
@@ -5033,6 +5038,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
5033
5038
let mut channel_id = None ;
5034
5039
let mut holder_pays_commitment_tx_fee = None ;
5035
5040
let mut payment_preimages_with_info: Option < HashMap < _ , _ > > = None ;
5041
+ let mut original_funding_txo = RequiredWrapper ( None ) ;
5036
5042
read_tlv_fields ! ( reader, {
5037
5043
( 1 , funding_spend_confirmed, option) ,
5038
5044
( 3 , htlcs_resolved_on_chain, optional_vec) ,
@@ -5047,6 +5053,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
5047
5053
( 21 , balances_empty_height, option) ,
5048
5054
( 23 , holder_pays_commitment_tx_fee, option) ,
5049
5055
( 25 , payment_preimages_with_info, option) ,
5056
+ ( 27 , original_funding_txo, ( default_value, funding_info. 0 ) ) ,
5050
5057
} ) ;
5051
5058
if let Some ( payment_preimages_with_info) = payment_preimages_with_info {
5052
5059
if payment_preimages_with_info. len ( ) != payment_preimages. len ( ) {
@@ -5099,6 +5106,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
5099
5106
holder_revocation_basepoint,
5100
5107
channel_id : channel_id. unwrap_or ( ChannelId :: v1_from_funding_outpoint ( outpoint) ) ,
5101
5108
funding_info,
5109
+ original_funding_txo : original_funding_txo. 0 . unwrap ( ) ,
5102
5110
current_counterparty_commitment_txid,
5103
5111
prev_counterparty_commitment_txid,
5104
5112
0 commit comments