Skip to content

Commit 034e490

Browse files
vincenzopalazzoksedgwic
authored andcommitted
hsmd: remove deprecated init v2
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 7875d8e commit 034e490

File tree

6 files changed

+1
-18
lines changed

6 files changed

+1
-18
lines changed

common/hsm_version.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* v4 with forget_channel: d87c6934ea188f92785d38d7cd0b13ed7f76aa7417f3200baf0c7b5aa832fe29
2323
* v5 with hsmd_revoke_commitment_tx: 5742538f87ef5d5bf55b66dc19e52c8683cfeb1b887d3e64ba530ba9a4d8e638
2424
* v5 with sign_any_cannouncement: 5fdb9068c43a21887dc03f7dce410d2e3eeff6277f0d49b4fc56595a798fd4a4
25+
* v5 drop init v2: 5024454532fe5a78bb7558000cb344190888b9915360d3d56ddca22eaba9b872
2526
*/
2627
#define HSM_MIN_VERSION 5
2728
#define HSM_MAX_VERSION 5

hsmd/hsmd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,6 @@ static struct io_plan *handle_client(struct io_conn *conn, struct client *c)
704704
case WIRE_HSMD_NODE_ANNOUNCEMENT_SIG_REPLY:
705705
case WIRE_HSMD_SIGN_WITHDRAWAL_REPLY:
706706
case WIRE_HSMD_SIGN_INVOICE_REPLY:
707-
case WIRE_HSMD_INIT_REPLY_V2:
708707
case WIRE_HSMD_INIT_REPLY_V4:
709708
case WIRE_HSMD_DERIVE_SECRET_REPLY:
710709
case WIRE_HSMSTATUS_CLIENT_BAD_REQUEST:

hsmd/hsmd_wire.csv

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ msgdata,hsmd_init,hsm_wire_min_version,u32,
1919
msgdata,hsmd_init,hsm_wire_max_version,u32,
2020

2121
#include <common/bip32.h>
22-
# DEPRECATED after 23.05, remove in two versions!
23-
msgtype,hsmd_init_reply_v2,113
24-
msgdata,hsmd_init_reply_v2,node_id,node_id,
25-
msgdata,hsmd_init_reply_v2,bip32,ext_key,
26-
msgdata,hsmd_init_reply_v2,bolt12,pubkey,
27-
2822
# Sorry: I should have put version in v2 :(
2923
msgtype,hsmd_init_reply_v4,114
3024
# This gets upgraded when the wire protocol changes in incompatible

hsmd/libhsmd.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ bool hsmd_check_client_capabilities(struct hsmd_client *client,
157157
case WIRE_HSMD_NODE_ANNOUNCEMENT_SIG_REPLY:
158158
case WIRE_HSMD_SIGN_WITHDRAWAL_REPLY:
159159
case WIRE_HSMD_SIGN_INVOICE_REPLY:
160-
case WIRE_HSMD_INIT_REPLY_V2:
161160
case WIRE_HSMD_INIT_REPLY_V4:
162161
case WIRE_HSMSTATUS_CLIENT_BAD_REQUEST:
163162
case WIRE_HSMD_SIGN_COMMITMENT_TX_REPLY:
@@ -2124,7 +2123,6 @@ u8 *hsmd_handle_client_message(const tal_t *ctx, struct hsmd_client *client,
21242123
case WIRE_HSMD_NODE_ANNOUNCEMENT_SIG_REPLY:
21252124
case WIRE_HSMD_SIGN_WITHDRAWAL_REPLY:
21262125
case WIRE_HSMD_SIGN_INVOICE_REPLY:
2127-
case WIRE_HSMD_INIT_REPLY_V2:
21282126
case WIRE_HSMD_INIT_REPLY_V4:
21292127
case WIRE_HSMSTATUS_CLIENT_BAD_REQUEST:
21302128
case WIRE_HSMD_SIGN_COMMITMENT_TX_REPLY:

lightningd/hsm_control.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ struct ext_key *hsm_init(struct lightningd *ld)
130130
&ld->id, bip32_base,
131131
&ld->bolt12_base)) {
132132
/* nothing to do. */
133-
} else if (fromwire_hsmd_init_reply_v2(msg,
134-
&ld->id, bip32_base,
135-
&ld->bolt12_base)) {
136-
/* implicit version */
137-
hsm_version = 3;
138-
ld->hsm_capabilities = NULL;
139133
} else {
140134
if (ld->config.keypass)
141135
errx(EXITCODE_HSM_BAD_PASSWORD, "Wrong password for encrypted hsm_secret.");

wallet/test/run-wallet.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,6 @@ bool fromwire_hsmd_forget_channel_reply(const void *p UNNEEDED)
306306
/* Generated stub for fromwire_hsmd_get_output_scriptpubkey_reply */
307307
bool fromwire_hsmd_get_output_scriptpubkey_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u8 **script UNNEEDED)
308308
{ fprintf(stderr, "fromwire_hsmd_get_output_scriptpubkey_reply called!\n"); abort(); }
309-
/* Generated stub for fromwire_hsmd_init_reply_v2 */
310-
bool fromwire_hsmd_init_reply_v2(const void *p UNNEEDED, struct node_id *node_id UNNEEDED, struct ext_key *bip32 UNNEEDED, struct pubkey *bolt12 UNNEEDED)
311-
{ fprintf(stderr, "fromwire_hsmd_init_reply_v2 called!\n"); abort(); }
312309
/* Generated stub for fromwire_hsmd_init_reply_v4 */
313310
bool fromwire_hsmd_init_reply_v4(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, u32 *hsm_version UNNEEDED, u32 **hsm_capabilities UNNEEDED, struct node_id *node_id UNNEEDED, struct ext_key *bip32 UNNEEDED, struct pubkey *bolt12 UNNEEDED)
314311
{ fprintf(stderr, "fromwire_hsmd_init_reply_v4 called!\n"); abort(); }

0 commit comments

Comments
 (0)