common: simple helpers to test for either anchor feature.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-06-26 08:37:21 +09:30
parent 0587cf324e
commit e036080fc5
4 changed files with 18 additions and 0 deletions

View File

@@ -97,6 +97,12 @@ bool channel_type_has(const struct channel_type *type, int feature)
return feature_offered(type->features, feature);
}
bool channel_type_has_anchors(const struct channel_type *type)
{
return feature_offered(type->features, OPT_ANCHOR_OUTPUTS)
|| feature_offered(type->features, OPT_ANCHORS_ZERO_FEE_HTLC_TX);
}
bool channel_type_eq(const struct channel_type *a,
const struct channel_type *b)
{