@@ -156,7 +156,7 @@ impl StaticPaymentOutputDescriptor {
156
156
pub fn witness_script ( & self ) -> Option < ScriptBuf > {
157
157
self . channel_transaction_parameters . as_ref ( )
158
158
. and_then ( |channel_params|
159
- if channel_params. channel_type_features . supports_anchors_zero_fee_htlc_tx ( ) {
159
+ if channel_params. supports_anchors ( ) {
160
160
let payment_point = channel_params. holder_pubkeys . payment_point ;
161
161
Some ( chan_utils:: get_to_countersignatory_with_anchors_redeemscript ( & payment_point) )
162
162
} else {
@@ -169,9 +169,7 @@ impl StaticPaymentOutputDescriptor {
169
169
/// Note: If you have the grind_signatures feature enabled, this will be at least 1 byte
170
170
/// shorter.
171
171
pub fn max_witness_length ( & self ) -> u64 {
172
- if self . channel_transaction_parameters . as_ref ( )
173
- . map ( |channel_params| channel_params. channel_type_features . supports_anchors_zero_fee_htlc_tx ( ) )
174
- . unwrap_or ( false )
172
+ if self . channel_transaction_parameters . as_ref ( ) . map_or ( false , |p| p. supports_anchors ( ) )
175
173
{
176
174
let witness_script_weight = 1 /* pubkey push */ + 33 /* pubkey */ +
177
175
1 /* OP_CHECKSIGVERIFY */ + 1 /* OP_1 */ + 1 /* OP_CHECKSEQUENCEVERIFY */ ;
@@ -356,8 +354,7 @@ impl SpendableOutputDescriptor {
356
354
if !output_set. insert ( descriptor. outpoint ) { return Err ( ( ) ) ; }
357
355
let sequence =
358
356
if descriptor. channel_transaction_parameters . as_ref ( )
359
- . map ( |channel_params| channel_params. channel_type_features . supports_anchors_zero_fee_htlc_tx ( ) )
360
- . unwrap_or ( false )
357
+ . map_or ( false , |p| p. supports_anchors ( ) )
361
358
{
362
359
Sequence :: from_consensus ( 1 )
363
360
} else {
0 commit comments