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