common: update HSM_MIN_VERSION to reflect reality.

We were handing 3 to hsmd (and Ken added that in 7b2c5617c1,
so I guess he's OK with that being the minimum supported version!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-03-21 06:56:02 +10:30
parent 48c334dc81
commit 21a1b4e6aa
2 changed files with 2 additions and 3 deletions

View file

@ -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 */

View file

@ -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");