@@ -875,6 +875,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: EcdsaChannelSigner> {
875
875
holder_revocation_basepoint : RevocationBasepoint ,
876
876
channel_id : ChannelId ,
877
877
funding_info : ( OutPoint , ScriptBuf ) ,
878
+ original_funding_txo : OutPoint ,
878
879
current_counterparty_commitment_txid : Option < Txid > ,
879
880
prev_counterparty_commitment_txid : Option < Txid > ,
880
881
@@ -1236,6 +1237,7 @@ impl<Signer: EcdsaChannelSigner> Writeable for ChannelMonitorImpl<Signer> {
1236
1237
( 21 , self . balances_empty_height, option) ,
1237
1238
( 23 , self . holder_pays_commitment_tx_fee, option) ,
1238
1239
( 25 , self . payment_preimages, required) ,
1240
+ ( 27 , self . original_funding_txo, required) ,
1239
1241
} ) ;
1240
1242
1241
1243
Ok ( ( ) )
@@ -1388,6 +1390,8 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
1388
1390
let mut outputs_to_watch = new_hash_map ( ) ;
1389
1391
outputs_to_watch. insert ( funding_info. 0 . txid , vec ! [ ( funding_info. 0 . index as u32 , funding_info. 1 . clone( ) ) ] ) ;
1390
1392
1393
+ let original_funding_txo = funding_info. 0 ;
1394
+
1391
1395
Self :: from_impl ( ChannelMonitorImpl {
1392
1396
latest_update_id : 0 ,
1393
1397
commitment_transaction_number_obscure_factor,
@@ -1401,6 +1405,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
1401
1405
holder_revocation_basepoint,
1402
1406
channel_id,
1403
1407
funding_info,
1408
+ original_funding_txo,
1404
1409
current_counterparty_commitment_txid : None ,
1405
1410
prev_counterparty_commitment_txid : None ,
1406
1411
@@ -4956,6 +4961,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
4956
4961
let mut channel_id = None ;
4957
4962
let mut holder_pays_commitment_tx_fee = None ;
4958
4963
let mut payment_preimages_with_info: Option < HashMap < _ , _ > > = None ;
4964
+ let mut original_funding_txo = RequiredWrapper ( None ) ;
4959
4965
read_tlv_fields ! ( reader, {
4960
4966
( 1 , funding_spend_confirmed, option) ,
4961
4967
( 3 , htlcs_resolved_on_chain, optional_vec) ,
@@ -4970,6 +4976,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
4970
4976
( 21 , balances_empty_height, option) ,
4971
4977
( 23 , holder_pays_commitment_tx_fee, option) ,
4972
4978
( 25 , payment_preimages_with_info, option) ,
4979
+ ( 27 , original_funding_txo, ( default_value, funding_info. 0 ) ) ,
4973
4980
} ) ;
4974
4981
if let Some ( payment_preimages_with_info) = payment_preimages_with_info {
4975
4982
if payment_preimages_with_info. len ( ) != payment_preimages. len ( ) {
@@ -5022,6 +5029,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
5022
5029
holder_revocation_basepoint,
5023
5030
channel_id : channel_id. unwrap_or ( ChannelId :: v1_from_funding_outpoint ( outpoint) ) ,
5024
5031
funding_info,
5032
+ original_funding_txo : original_funding_txo. 0 . unwrap ( ) ,
5025
5033
current_counterparty_commitment_txid,
5026
5034
prev_counterparty_commitment_txid,
5027
5035
0 commit comments