@@ -1898,7 +1898,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
1898
1898
self . holder_tx_signed = true ;
1899
1899
let commitment_tx = self . onchain_tx_handler . get_fully_signed_holder_tx ( & self . funding_redeemscript ) ;
1900
1900
let txid = commitment_tx. txid ( ) ;
1901
- let mut res = vec ! [ commitment_tx] ;
1901
+ let mut holder_transactions = vec ! [ commitment_tx] ;
1902
1902
for htlc in self . current_holder_commitment_tx . htlc_outputs . iter ( ) {
1903
1903
if let Some ( vout) = htlc. 0 . transaction_output_index {
1904
1904
let preimage = if !htlc. 0 . offered {
@@ -1916,21 +1916,22 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
1916
1916
} else { None } ;
1917
1917
if let Some ( htlc_tx) = self . onchain_tx_handler . get_fully_signed_htlc_tx (
1918
1918
& :: bitcoin:: OutPoint { txid, vout } , & preimage) {
1919
- res . push ( htlc_tx) ;
1919
+ holder_transactions . push ( htlc_tx) ;
1920
1920
}
1921
1921
}
1922
1922
}
1923
1923
// 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.
1924
1924
// The data will be re-generated and tracked in check_spend_holder_transaction if we get a confirmation.
1925
- return res ;
1925
+ holder_transactions
1926
1926
}
1927
1927
1928
1928
#[ cfg( any( test, feature = "unsafe_revoked_tx_signing" ) ) ]
1929
+ /// Note that this includes possibly-locktimed-in-the-future transactions!
1929
1930
fn unsafe_get_latest_holder_commitment_txn < L : Deref > ( & mut self , logger : & L ) -> Vec < Transaction > where L :: Target : Logger {
1930
1931
log_trace ! ( logger, "Getting signed copy of latest holder commitment transaction!" ) ;
1931
1932
let commitment_tx = self . onchain_tx_handler . get_fully_signed_copy_holder_tx ( & self . funding_redeemscript ) ;
1932
1933
let txid = commitment_tx. txid ( ) ;
1933
- let mut res = vec ! [ commitment_tx] ;
1934
+ let mut holder_transactions = vec ! [ commitment_tx] ;
1934
1935
for htlc in self . current_holder_commitment_tx . htlc_outputs . iter ( ) {
1935
1936
if let Some ( vout) = htlc. 0 . transaction_output_index {
1936
1937
let preimage = if !htlc. 0 . offered {
@@ -1941,11 +1942,11 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
1941
1942
} else { None } ;
1942
1943
if let Some ( htlc_tx) = self . onchain_tx_handler . unsafe_get_fully_signed_htlc_tx (
1943
1944
& :: bitcoin:: OutPoint { txid, vout } , & preimage) {
1944
- res . push ( htlc_tx) ;
1945
+ holder_transactions . push ( htlc_tx) ;
1945
1946
}
1946
1947
}
1947
1948
}
1948
- return res
1949
+ holder_transactions
1949
1950
}
1950
1951
1951
1952
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