mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
hsmd: make the negotiated hsmd version available to libhsmd
Changelog-None: hsmd internals
This commit is contained in:
parent
a02cc6441a
commit
37fe32aa17
@ -511,8 +511,8 @@ static struct io_plan *init_hsm(struct io_conn *conn,
|
||||
discard_key(take(hsm_encryption_key));
|
||||
|
||||
/* Define the minimum common max version for the hsmd one */
|
||||
u64 mutual_version = maxversion < our_maxversion ? maxversion : our_maxversion;
|
||||
return req_reply(conn, c, hsmd_init(hsm_secret, mutual_version,
|
||||
hsmd_mutual_version = maxversion < our_maxversion ? maxversion : our_maxversion;
|
||||
return req_reply(conn, c, hsmd_init(hsm_secret, hsmd_mutual_version,
|
||||
bip32_key_version));
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,9 @@
|
||||
#include <sodium/utils.h>
|
||||
#include <wally_psbt.h>
|
||||
|
||||
/* The negotiated protocol version ends up in here. */
|
||||
u64 hsmd_mutual_version;
|
||||
|
||||
/* If they specify --dev-force-privkey it ends up in here. */
|
||||
struct privkey *dev_force_privkey;
|
||||
/* If they specify --dev-force-bip32-seed it ends up in here. */
|
||||
|
@ -89,6 +89,9 @@ void hsmd_status_failed(enum status_failreason code,
|
||||
bool hsmd_check_client_capabilities(struct hsmd_client *client,
|
||||
enum hsmd_wire t);
|
||||
|
||||
/* The negotiated protocol version ends up in here. */
|
||||
extern u64 hsmd_mutual_version;
|
||||
|
||||
/* If they specify --dev-force-privkey it ends up in here. */
|
||||
extern struct privkey *dev_force_privkey;
|
||||
/* If they specify --dev-force-bip32-seed it ends up in here. */
|
||||
|
Loading…
Reference in New Issue
Block a user