channeld: send upgradable types, add logging (EXPERIMENTAL_FEATURES)

For now the only upgrade possible is to enable option_static_remotekey.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-06-04 14:43:47 +09:30
parent d2814a957f
commit d305b8ada6
4 changed files with 50 additions and 0 deletions

View File

@@ -186,6 +186,17 @@ struct channel_type *channel_type(const tal_t *ctx,
return new_channel_type(ctx);
}
struct channel_type **channel_upgradable_types(const tal_t *ctx,
const struct channel *channel)
{
struct channel_type **arr = tal_arr(ctx, struct channel_type *, 0);
if (!channel->option_static_remotekey)
tal_arr_expand(&arr, type_static_remotekey(arr));
return arr;
}
#endif /* EXPERIMENTAL_FEATURES */
static char *fmt_channel_view(const tal_t *ctx, const struct channel_view *view)