@@ -879,6 +879,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: EcdsaChannelSigner> {
879879 holder_revocation_basepoint : RevocationBasepoint ,
880880 channel_id : ChannelId ,
881881 funding_info : ( OutPoint , ScriptBuf ) ,
882+ original_funding_txo : OutPoint ,
882883 current_counterparty_commitment_txid : Option < Txid > ,
883884 prev_counterparty_commitment_txid : Option < Txid > ,
884885
@@ -1246,6 +1247,7 @@ impl<Signer: EcdsaChannelSigner> Writeable for ChannelMonitorImpl<Signer> {
12461247 ( 21 , self . balances_empty_height, option) ,
12471248 ( 23 , self . holder_pays_commitment_tx_fee, option) ,
12481249 ( 25 , self . payment_preimages, required) ,
1250+ ( 27 , self . original_funding_txo, required) ,
12491251 } ) ;
12501252
12511253 Ok ( ( ) )
@@ -1398,6 +1400,8 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
13981400 let mut outputs_to_watch = new_hash_map ( ) ;
13991401 outputs_to_watch. insert ( funding_info. 0 . txid , vec ! [ ( funding_info. 0 . index as u32 , funding_info. 1 . clone( ) ) ] ) ;
14001402
1403+ let original_funding_txo = funding_info. 0 ;
1404+
14011405 Self :: from_impl ( ChannelMonitorImpl {
14021406 latest_update_id : 0 ,
14031407 commitment_transaction_number_obscure_factor,
@@ -1411,6 +1415,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
14111415 holder_revocation_basepoint,
14121416 channel_id,
14131417 funding_info,
1418+ original_funding_txo,
14141419 current_counterparty_commitment_txid : None ,
14151420 prev_counterparty_commitment_txid : None ,
14161421
@@ -5033,6 +5038,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
50335038 let mut channel_id = None ;
50345039 let mut holder_pays_commitment_tx_fee = None ;
50355040 let mut payment_preimages_with_info: Option < HashMap < _ , _ > > = None ;
5041+ let mut original_funding_txo = RequiredWrapper ( None ) ;
50365042 read_tlv_fields ! ( reader, {
50375043 ( 1 , funding_spend_confirmed, option) ,
50385044 ( 3 , htlcs_resolved_on_chain, optional_vec) ,
@@ -5047,6 +5053,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
50475053 ( 21 , balances_empty_height, option) ,
50485054 ( 23 , holder_pays_commitment_tx_fee, option) ,
50495055 ( 25 , payment_preimages_with_info, option) ,
5056+ ( 27 , original_funding_txo, ( default_value, funding_info. 0 ) ) ,
50505057 } ) ;
50515058 if let Some ( payment_preimages_with_info) = payment_preimages_with_info {
50525059 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
50995106 holder_revocation_basepoint,
51005107 channel_id : channel_id. unwrap_or ( ChannelId :: v1_from_funding_outpoint ( outpoint) ) ,
51015108 funding_info,
5109+ original_funding_txo : original_funding_txo. 0 . unwrap ( ) ,
51025110 current_counterparty_commitment_txid,
51035111 prev_counterparty_commitment_txid,
51045112
0 commit comments