EXPERIMENTAL_FEATURES: don't offer to downgrade anchor outputs!

We don't support this, even if other side allowed it (which we certainly
don't).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-06-21 12:24:44 +09:30
parent 35c8247b5f
commit eaa2ff23f1
1 changed files with 4 additions and 0 deletions

View File

@ -201,6 +201,10 @@ struct channel_type **channel_upgradable_types(const tal_t *ctx,
struct channel_type *channel_desired_type(const tal_t *ctx,
const struct channel *channel)
{
/* We don't actually want to downgrade anchors! */
if (channel->option_anchor_outputs)
return type_anchor_outputs(ctx);
/* For now, we just want option_static_remotekey */
return type_static_remotekey(ctx);
}