@@ -37,7 +37,6 @@ use crate::ln::msgs::PartialSignatureWithNonce;
3737#[ cfg( taproot) ]
3838use crate :: sign:: taproot:: TaprootChannelSigner ;
3939use crate :: sign:: HTLCDescriptor ;
40- use crate :: types:: features:: ChannelTypeFeatures ;
4140use crate :: util:: ser:: { Writeable , Writer } ;
4241use bitcoin:: secp256k1;
4342#[ cfg( taproot) ]
@@ -139,10 +138,6 @@ impl TestChannelSigner {
139138 Self { inner, state, disable_revocation_policy_check }
140139 }
141140
142- pub fn channel_type_features ( & self ) -> & ChannelTypeFeatures {
143- self . inner . channel_type_features ( ) . unwrap ( )
144- }
145-
146141 #[ cfg( test) ]
147142 pub fn get_enforcement_state ( & self ) -> MutexGuard < EnforcementState > {
148143 self . state . lock ( ) . unwrap ( )
@@ -376,7 +371,10 @@ impl EcdsaChannelSigner for TestChannelSigner {
376371 assert_eq ! ( htlc_tx. output[ input] , htlc_descriptor. tx_output( secp_ctx) ) ;
377372 {
378373 let witness_script = htlc_descriptor. witness_script ( secp_ctx) ;
379- let sighash_type = if self . channel_type_features ( ) . supports_anchors_zero_fee_htlc_tx ( ) {
374+ let channel_parameters =
375+ & htlc_descriptor. channel_derivation_parameters . transaction_parameters ;
376+ let channel_type_features = & channel_parameters. channel_type_features ;
377+ let sighash_type = if channel_type_features. supports_anchors_zero_fee_htlc_tx ( ) {
380378 EcdsaSighashType :: SinglePlusAnyoneCanPay
381379 } else {
382380 EcdsaSighashType :: All
@@ -391,7 +389,7 @@ impl EcdsaChannelSigner for TestChannelSigner {
391389 . unwrap ( ) ;
392390 let countersignatory_htlc_key = HtlcKey :: from_basepoint (
393391 & secp_ctx,
394- & self . inner . counterparty_pubkeys ( ) . unwrap ( ) . htlc_basepoint ,
392+ & channel_parameters . counterparty_pubkeys ( ) . unwrap ( ) . htlc_basepoint ,
395393 & htlc_descriptor. per_commitment_point ,
396394 ) ;
397395
0 commit comments