@@ -69,10 +69,10 @@ pub fn max_htlcs(channel_type: &ChannelTypeFeatures) -> u16 {
69
69
483
70
70
}
71
71
}
72
- /// The weight of a BIP141 witnessScript for a BOLT3's "offered HTLC output" on a commitment transaction, non-anchor variant.
72
+ /// The weight of a BIP141 witnessScript for a BOLT3's "offered HTLC output" on a commitment transaction, non-anchor and p2a anchor variant.
73
73
pub const OFFERED_HTLC_SCRIPT_WEIGHT : usize = 133 ;
74
- /// The weight of a BIP141 witnessScript for a BOLT3's "offered HTLC output" on a commitment transaction, anchor variant.
75
- pub const OFFERED_HTLC_SCRIPT_WEIGHT_ANCHORS : usize = 136 ;
74
+ /// The weight of a BIP141 witnessScript for a BOLT3's "offered HTLC output" on a commitment transaction, keyed anchor variant.
75
+ pub const OFFERED_HTLC_SCRIPT_WEIGHT_KEYED_ANCHORS : usize = 136 ;
76
76
77
77
/// The weight of a BIP141 witnessScript for a BOLT3's "received HTLC output" can vary in function of its CLTV argument value.
78
78
/// We define a range that encompasses both its non-anchors and anchors variants.
@@ -162,7 +162,7 @@ impl HTLCClaim {
162
162
/// Check if a given input witness attempts to claim a HTLC.
163
163
#[ rustfmt:: skip]
164
164
pub fn from_witness ( witness : & Witness ) -> Option < Self > {
165
- debug_assert_eq ! ( OFFERED_HTLC_SCRIPT_WEIGHT_ANCHORS , MIN_ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
165
+ debug_assert_eq ! ( OFFERED_HTLC_SCRIPT_WEIGHT_KEYED_ANCHORS , MIN_ACCEPTED_HTLC_SCRIPT_WEIGHT ) ;
166
166
if witness. len ( ) < 2 {
167
167
return None ;
168
168
}
@@ -181,7 +181,7 @@ impl HTLCClaim {
181
181
} else {
182
182
None
183
183
}
184
- } else if witness_script. len ( ) == OFFERED_HTLC_SCRIPT_WEIGHT_ANCHORS {
184
+ } else if witness_script. len ( ) == OFFERED_HTLC_SCRIPT_WEIGHT_KEYED_ANCHORS {
185
185
// It's possible for the weight of `offered_htlc_script` and `accepted_htlc_script` to
186
186
// match so we check for both here.
187
187
if witness. len ( ) == 3 && second_to_last. len ( ) == 33 {
0 commit comments