From 21a1b4e6aabc26d5210d09699dc921e8c6f108ea Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 21 Mar 2023 06:56:02 +1030 Subject: [PATCH] common: update HSM_MIN_VERSION to reflect reality. We were handing 3 to hsmd (and Ken added that in 7b2c5617c16dab22f94a51955b5bdea38f284a12, so I guess he's OK with that being the minimum supported version!). Signed-off-by: Rusty Russell --- common/hsm_version.h | 2 +- lightningd/hsm_control.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/hsm_version.h b/common/hsm_version.h index 63868a56f..38a54d7b3 100644 --- a/common/hsm_version.h +++ b/common/hsm_version.h @@ -11,6 +11,6 @@ * v3: edd3d288fc88a5470adc2f99abcbfe4d4af29fae0c7a80b4226f28810a815524 * v3 without v1: 3f813898f7de490e9126ab817e1c9a29af79c0413d5e37068acedce3ea7b5429 */ -#define HSM_MIN_VERSION 2 +#define HSM_MIN_VERSION 3 #define HSM_MAX_VERSION 3 #endif /* LIGHTNING_COMMON_HSM_VERSION_H */ diff --git a/lightningd/hsm_control.c b/lightningd/hsm_control.c index 537714f83..bdc8a2097 100644 --- a/lightningd/hsm_control.c +++ b/lightningd/hsm_control.c @@ -104,7 +104,6 @@ struct ext_key *hsm_init(struct lightningd *ld) } ld->hsm_fd = fds[0]; - u32 min_version = 3; /* payment modifiers need hsmd_preapprove_{invoice,keysend} */ if (!wire_sync_write(ld->hsm_fd, towire_hsmd_init(tmpctx, &chainparams->bip32_key_version, chainparams, @@ -113,7 +112,7 @@ struct ext_key *hsm_init(struct lightningd *ld) IFDEV(ld->dev_force_bip32_seed, NULL), IFDEV(ld->dev_force_channel_secrets, NULL), IFDEV(ld->dev_force_channel_secrets_shaseed, NULL), - min_version, + HSM_MIN_VERSION, HSM_MAX_VERSION))) err(EXITCODE_HSM_GENERIC_ERROR, "Writing init msg to hsm");