Skip to content

Commit 3005799

Browse files
committed
hsmd: support HSM_VERSION 6
Changelog-Changed: hsmd: the hsmd now supports HSM_VERSION 6 This is actually optional, everything should be ok leaving native hsmd support at HSM_VERSION 5.
1 parent b8901ac commit 3005799

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hsmd/hsmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ static struct io_plan *init_hsm(struct io_conn *conn,
436436
struct secret *hsm_encryption_key;
437437
struct bip32_key_version bip32_key_version;
438438
u32 minversion, maxversion;
439-
const u32 our_minversion = 4, our_maxversion = 5;
439+
const u32 our_minversion = 4, our_maxversion = 6;
440440

441441
/* This must be lightningd. */
442442
assert(is_lightningd(c));

hsmd/libhsmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ static u8 *handle_get_per_commitment_point(struct hsmd_client *c, const u8 *msg_
11881188
return hsmd_status_bad_request_fmt(
11891189
c, msg_in, "bad per_commit_point %" PRIu64, n);
11901190

1191-
if (n >= 2) {
1191+
if (hsmd_mutual_version < 6 && n >= 2) {
11921192
old_secret = tal(tmpctx, struct secret);
11931193
if (!per_commit_secret(&shaseed, old_secret, n - 2)) {
11941194
return hsmd_status_bad_request_fmt(

0 commit comments

Comments
 (0)