hsmd: support HSM_VERSION 6

Changelog-Changed: hsmd: the hsmd now supports HSM_VERSION 6

This is actually optional, everything would be ok leaving native hsmd
support at HSM_VERSION 5 instead.
This commit is contained in:
Ken Sedgwick 2024-03-15 14:24:02 -07:00 committed by Alex Myers
parent eda0b28cbb
commit cfcdde14d8
2 changed files with 2 additions and 2 deletions

View file

@ -457,7 +457,7 @@ static struct io_plan *init_hsm(struct io_conn *conn,
struct secret *hsm_encryption_key;
struct bip32_key_version bip32_key_version;
u32 minversion, maxversion;
const u32 our_minversion = 4, our_maxversion = 5;
const u32 our_minversion = 4, our_maxversion = 6;
/* This must be lightningd. */
assert(is_lightningd(c));

View file

@ -1206,7 +1206,7 @@ static u8 *handle_get_per_commitment_point(struct hsmd_client *c, const u8 *msg_
return hsmd_status_bad_request_fmt(
c, msg_in, "bad per_commit_point %" PRIu64, n);
if (n >= 2) {
if (hsmd_mutual_version < 6 && n >= 2) {
old_secret = tal(tmpctx, struct secret);
if (!per_commit_secret(&shaseed, old_secret, n - 2)) {
return hsmd_status_bad_request_fmt(