@@ -630,7 +630,7 @@ impl HTLCDescriptor {
630630 chan_utils:: build_htlc_input (
631631 & self . commitment_txid ,
632632 & self . htlc ,
633- & self . channel_derivation_parameters . transaction_parameters . channel_type_features ,
633+ self . channel_derivation_parameters . transaction_parameters . channel_type_features ( ) ,
634634 )
635635 }
636636
@@ -640,7 +640,7 @@ impl HTLCDescriptor {
640640 chan_utils:: build_htlc_output (
641641 self . feerate_per_kw ,
642642 & self . htlc ,
643- & self . channel_derivation_parameters . transaction_parameters . channel_type_features ,
643+ self . channel_derivation_parameters . transaction_parameters . channel_type_features ( ) ,
644644 revokeable_spk,
645645 )
646646 }
@@ -685,7 +685,7 @@ impl HTLCDescriptor {
685685 & self . counterparty_sig ,
686686 & self . preimage ,
687687 witness_script,
688- & self . channel_derivation_parameters . transaction_parameters . channel_type_features ,
688+ self . channel_derivation_parameters . transaction_parameters . channel_type_features ( ) ,
689689 )
690690 }
691691
@@ -917,7 +917,7 @@ pub trait ChannelSigner {
917917 /// Return the total weight of the witness required to spend the justice path of a HTLC output in a
918918 /// commitment transaction.
919919 fn get_htlc_punishment_witness_weight ( & self , offered : bool ) -> u64 {
920- let features = & self . get_channel_parameters ( ) . unwrap ( ) . channel_type_features ;
920+ let features = self . get_channel_parameters ( ) . unwrap ( ) . channel_type_features ( ) ;
921921 if offered {
922922 weight_revoked_offered_htlc ( features)
923923 } else {
@@ -935,7 +935,7 @@ pub trait ChannelSigner {
935935
936936 /// Weight of the witness that sweeps htlc outputs in counterparty commitment transactions
937937 fn counterparty_htlc_output_witness_weight ( & self , offered : bool ) -> u64 {
938- let features = & self . get_channel_parameters ( ) . unwrap ( ) . channel_type_features ;
938+ let features = self . get_channel_parameters ( ) . unwrap ( ) . channel_type_features ( ) ;
939939 if offered {
940940 weight_offered_htlc ( features)
941941 } else {
@@ -1027,7 +1027,7 @@ pub trait ChannelSigner {
10271027 /// Get the anchor output of a commit tx
10281028 fn get_anchor_txout ( & self , is_holder_tx : bool , is_broadcaster_anchor : bool ) -> Option < TxOut > {
10291029 let channel_parameters = self . get_channel_parameters ( ) . unwrap ( ) ;
1030- if channel_parameters. channel_type_features . supports_anchors_zero_fee_htlc_tx ( ) {
1030+ if channel_parameters. channel_type_features ( ) . supports_anchors_zero_fee_htlc_tx ( ) {
10311031 let params = if is_holder_tx {
10321032 channel_parameters. as_holder_broadcastable ( )
10331033 } else {
@@ -1432,7 +1432,7 @@ impl InMemorySigner {
14321432 /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
14331433 /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
14341434 pub fn channel_type_features ( & self ) -> Option < & ChannelTypeFeatures > {
1435- self . get_channel_parameters ( ) . map ( |params| & params. channel_type_features )
1435+ self . get_channel_parameters ( ) . map ( |params| params. channel_type_features ( ) )
14361436 }
14371437
14381438 /// Sign the single input of `spend_tx` at index `input_idx`, which spends the output described
@@ -1797,7 +1797,7 @@ impl ChannelSigner for InMemorySigner {
17971797 let sighash = hash_to_message ! ( sighash. as_byte_array( ) ) ;
17981798 let sig = sign_with_aux_rand ( & secp_ctx, & sighash, & our_htlc_private_key, & self ) ;
17991799
1800- let features = & self . channel_parameters . as_ref ( ) . unwrap ( ) . channel_type_features ;
1800+ let features = self . channel_parameters . as_ref ( ) . unwrap ( ) . channel_type_features ( ) ;
18011801 Ok ( chan_utils:: build_htlc_input_witness (
18021802 & sig,
18031803 & htlc_descriptor. counterparty_sig ,
@@ -1852,7 +1852,7 @@ impl EcdsaChannelSigner for InMemorySigner {
18521852 ) ;
18531853 for htlc in commitment_tx. htlcs ( ) {
18541854 let channel_parameters = self . get_channel_parameters ( ) . expect ( MISSING_PARAMS_ERR ) ;
1855- let chan_type = & channel_parameters. channel_type_features ;
1855+ let chan_type = channel_parameters. channel_type_features ( ) ;
18561856 let htlc_tx = chan_utils:: build_htlc_transaction (
18571857 & commitment_txid,
18581858 commitment_tx. feerate_per_kw ( ) ,
0 commit comments