@@ -37,7 +37,6 @@ use crate::ln::msgs::PartialSignatureWithNonce;
37
37
#[ cfg( taproot) ]
38
38
use crate :: sign:: taproot:: TaprootChannelSigner ;
39
39
use crate :: sign:: HTLCDescriptor ;
40
- use crate :: types:: features:: ChannelTypeFeatures ;
41
40
use crate :: util:: ser:: { Writeable , Writer } ;
42
41
use bitcoin:: secp256k1;
43
42
#[ cfg( taproot) ]
@@ -139,10 +138,6 @@ impl TestChannelSigner {
139
138
Self { inner, state, disable_revocation_policy_check }
140
139
}
141
140
142
- pub fn channel_type_features ( & self ) -> & ChannelTypeFeatures {
143
- self . inner . channel_type_features ( ) . unwrap ( )
144
- }
145
-
146
141
#[ cfg( test) ]
147
142
pub fn get_enforcement_state ( & self ) -> MutexGuard < EnforcementState > {
148
143
self . state . lock ( ) . unwrap ( )
@@ -376,7 +371,10 @@ impl EcdsaChannelSigner for TestChannelSigner {
376
371
assert_eq ! ( htlc_tx. output[ input] , htlc_descriptor. tx_output( secp_ctx) ) ;
377
372
{
378
373
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 ( ) {
380
378
EcdsaSighashType :: SinglePlusAnyoneCanPay
381
379
} else {
382
380
EcdsaSighashType :: All
@@ -391,7 +389,7 @@ impl EcdsaChannelSigner for TestChannelSigner {
391
389
. unwrap ( ) ;
392
390
let countersignatory_htlc_key = HtlcKey :: from_basepoint (
393
391
& secp_ctx,
394
- & self . inner . counterparty_pubkeys ( ) . unwrap ( ) . htlc_basepoint ,
392
+ & channel_parameters . counterparty_pubkeys ( ) . unwrap ( ) . htlc_basepoint ,
395
393
& htlc_descriptor. per_commitment_point ,
396
394
) ;
397
395
0 commit comments