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

@@ -182,6 +182,11 @@ bool channel_has(const struct channel *channel, int feature)
return channel_type_has(channel->type, feature);
}
bool channel_has_anchors(const struct channel *channel)
{
return channel_type_has_anchors(channel->type);
}
static char *fmt_channel_view(const tal_t *ctx, const struct channel_view *view)
{
return tal_fmt(ctx, "{ owed_local=%s,"