@@ -1899,7 +1899,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
18991899 self . holder_tx_signed = true ;
19001900 let commitment_tx = self . onchain_tx_handler . get_fully_signed_holder_tx ( & self . funding_redeemscript ) ;
19011901 let txid = commitment_tx. txid ( ) ;
1902- let mut res = vec ! [ commitment_tx] ;
1902+ let mut holder_transactions = vec ! [ commitment_tx] ;
19031903 for htlc in self . current_holder_commitment_tx . htlc_outputs . iter ( ) {
19041904 if let Some ( vout) = htlc. 0 . transaction_output_index {
19051905 let preimage = if !htlc. 0 . offered {
@@ -1917,21 +1917,22 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
19171917 } else { None } ;
19181918 if let Some ( htlc_tx) = self . onchain_tx_handler . get_fully_signed_htlc_tx (
19191919 & :: bitcoin:: OutPoint { txid, vout } , & preimage) {
1920- res . push ( htlc_tx) ;
1920+ holder_transactions . push ( htlc_tx) ;
19211921 }
19221922 }
19231923 }
19241924 // We throw away the generated waiting_first_conf data as we aren't (yet) confirmed and we don't actually know what the caller wants to do.
19251925 // The data will be re-generated and tracked in check_spend_holder_transaction if we get a confirmation.
1926- return res ;
1926+ holder_transactions
19271927 }
19281928
19291929 #[ cfg( any( test, feature = "unsafe_revoked_tx_signing" ) ) ]
1930+ /// Note that this includes possibly-locktimed-in-the-future transactions!
19301931 fn unsafe_get_latest_holder_commitment_txn < L : Deref > ( & mut self , logger : & L ) -> Vec < Transaction > where L :: Target : Logger {
19311932 log_trace ! ( logger, "Getting signed copy of latest holder commitment transaction!" ) ;
19321933 let commitment_tx = self . onchain_tx_handler . get_fully_signed_copy_holder_tx ( & self . funding_redeemscript ) ;
19331934 let txid = commitment_tx. txid ( ) ;
1934- let mut res = vec ! [ commitment_tx] ;
1935+ let mut holder_transactions = vec ! [ commitment_tx] ;
19351936 for htlc in self . current_holder_commitment_tx . htlc_outputs . iter ( ) {
19361937 if let Some ( vout) = htlc. 0 . transaction_output_index {
19371938 let preimage = if !htlc. 0 . offered {
@@ -1942,11 +1943,11 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
19421943 } else { None } ;
19431944 if let Some ( htlc_tx) = self . onchain_tx_handler . unsafe_get_fully_signed_htlc_tx (
19441945 & :: bitcoin:: OutPoint { txid, vout } , & preimage) {
1945- res . push ( htlc_tx) ;
1946+ holder_transactions . push ( htlc_tx) ;
19461947 }
19471948 }
19481949 }
1949- return res
1950+ holder_transactions
19501951 }
19511952
19521953 pub fn block_connected < B : Deref , F : Deref , L : Deref > ( & mut self , header : & BlockHeader , txdata : & TransactionData , height : u32 , broadcaster : B , fee_estimator : F , logger : L ) -> Vec < TransactionOutputs >
0 commit comments