shutdown: don't allow shutdown to p2pkh or p2sh addresses for anchor outputs.

This doesn't have an effect now (except in experimental mode), but it
will when we support anchors.  So we deprecate the use of those in the
close command too.

For experimental mode we have to avoid using p2pkh; adapt that test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSON-RPC: `shutdown` no longer allows p2pkh or p2sh addresses.
This commit is contained in:
Rusty Russell
2022-03-31 19:40:50 +10:30
parent 7491af5495
commit 9f06a59e3c
10 changed files with 57 additions and 22 deletions

View File

@@ -117,12 +117,14 @@ const char *fmt_featurebits(const tal_t *ctx, const u8 *featurebits);
* | 16/17 | `basic_mpp` |... IN9 ...
* | 18/19 | `option_support_large_channel` |... IN ...
* | 20/21 | `option_anchor_outputs` |... IN ...
* | 22/23 | `option_anchors_zero_fee_htlc_tx` |... IN ...
* | 26/27 | `option_shutdown_anysegwit` |... IN ...
*/
#define OPT_PAYMENT_SECRET 14
#define OPT_BASIC_MPP 16
#define OPT_LARGE_CHANNELS 18
#define OPT_ANCHOR_OUTPUTS 20
#define OPT_ANCHORS_ZERO_FEE_HTLC_TX 22
#define OPT_SHUTDOWN_ANYSEGWIT 26
/* BOLT-f53ca2301232db780843e894f55d95d512f297f9 #9: