@@ -830,7 +830,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
830
830
if let Ok ( sigs) = self . key_storage . sign_local_commitment_htlc_transactions ( local_commitment, self . local_csv , & self . secp_ctx ) {
831
831
self . local_htlc_sigs = Some ( Vec :: new ( ) ) ;
832
832
let ret = self . local_htlc_sigs . as_mut ( ) . unwrap ( ) ;
833
- for ( htlc_idx, ( local_sig, ( htlc, _) ) ) in sigs. iter ( ) . zip ( local_commitment. per_htlc . iter ( ) ) . enumerate ( ) {
833
+ for ( htlc_idx, ( local_sig, & ( ref htlc, _) ) ) in sigs. iter ( ) . zip ( local_commitment. per_htlc . iter ( ) ) . enumerate ( ) {
834
834
if let Some ( tx_idx) = htlc. transaction_output_index {
835
835
if ret. len ( ) <= tx_idx as usize { ret. resize ( tx_idx as usize + 1 , None ) ; }
836
836
ret[ tx_idx as usize ] = Some ( ( htlc_idx, local_sig. expect ( "Did not receive a signature for a non-dust HTLC" ) ) ) ;
@@ -846,7 +846,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
846
846
if let Ok ( sigs) = self . key_storage . sign_local_commitment_htlc_transactions ( local_commitment, self . local_csv , & self . secp_ctx ) {
847
847
self . prev_local_htlc_sigs = Some ( Vec :: new ( ) ) ;
848
848
let ret = self . prev_local_htlc_sigs . as_mut ( ) . unwrap ( ) ;
849
- for ( htlc_idx, ( local_sig, ( htlc, _) ) ) in sigs. iter ( ) . zip ( local_commitment. per_htlc . iter ( ) ) . enumerate ( ) {
849
+ for ( htlc_idx, ( local_sig, & ( ref htlc, _) ) ) in sigs. iter ( ) . zip ( local_commitment. per_htlc . iter ( ) ) . enumerate ( ) {
850
850
if let Some ( tx_idx) = htlc. transaction_output_index {
851
851
if ret. len ( ) <= tx_idx as usize { ret. resize ( tx_idx as usize + 1 , None ) ; }
852
852
ret[ tx_idx as usize ] = Some ( ( htlc_idx, local_sig. expect ( "Did not receive a signature for a non-dust HTLC" ) ) ) ;
@@ -893,7 +893,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
893
893
if commitment_txid == outp. txid {
894
894
self . sign_latest_local_htlcs ( ) ;
895
895
if let & Some ( ref htlc_sigs) = & self . local_htlc_sigs {
896
- let ( htlc_idx, htlc_sig) = htlc_sigs[ outp. vout as usize ] . as_ref ( ) . unwrap ( ) ;
896
+ let & ( ref htlc_idx, ref htlc_sig) = htlc_sigs[ outp. vout as usize ] . as_ref ( ) . unwrap ( ) ;
897
897
htlc_tx = Some ( self . local_commitment . as_ref ( ) . unwrap ( )
898
898
. get_signed_htlc_tx ( * htlc_idx, htlc_sig, preimage, self . local_csv ) ) ;
899
899
}
@@ -904,7 +904,7 @@ impl<ChanSigner: ChannelKeys> OnchainTxHandler<ChanSigner> {
904
904
if commitment_txid == outp. txid {
905
905
self . sign_prev_local_htlcs ( ) ;
906
906
if let & Some ( ref htlc_sigs) = & self . prev_local_htlc_sigs {
907
- let ( htlc_idx, htlc_sig) = htlc_sigs[ outp. vout as usize ] . as_ref ( ) . unwrap ( ) ;
907
+ let & ( ref htlc_idx, ref htlc_sig) = htlc_sigs[ outp. vout as usize ] . as_ref ( ) . unwrap ( ) ;
908
908
htlc_tx = Some ( self . prev_local_commitment . as_ref ( ) . unwrap ( )
909
909
. get_signed_htlc_tx ( * htlc_idx, htlc_sig, preimage, self . local_csv ) ) ;
910
910
}
0 commit comments