Skip to content

Commit

Permalink
hsmd: support HSM_VERSION 6
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ksedgwic authored and endothermicdev committed May 14, 2024
1 parent eda0b28 commit cfcdde1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hsmd/hsmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion hsmd/libhsmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cfcdde1

Please sign in to comment.