Skip to content

Commit 956a741

Browse files
authored
Added NodeConfig::NATIVE to InitReq. (#14)
1 parent c3349f2 commit 956a741

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

contrib/remote_hsmd/proxy.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ void marshal_secret(struct secret const *ss, Secret *o_sp)
124124
o_sp->set_data(ss->data, sizeof(ss->data));
125125
}
126126

127+
void marshal_bip32seed(struct secret const *ss, BIP32Seed *o_sp)
128+
{
129+
o_sp->set_data(ss->data, sizeof(ss->data));
130+
}
131+
127132
void marshal_node_id(struct node_id const *np, NodeId *o_np)
128133
{
129134
o_np->set_data(np->k, sizeof(np->k));
@@ -323,14 +328,17 @@ proxy_stat proxy_init_hsm(struct bip32_key_version *bip32_key_version,
323328
last_message = "";
324329
InitRequest req;
325330

331+
auto nc = req.mutable_node_config();
332+
nc->set_key_derivation_style(NodeConfig::NATIVE);
333+
326334
auto cp = req.mutable_chainparams();
327335
cp->set_network_name(chainparams->network_name);
328336

329337
req.set_coldstart(coldstart);
330338

331339
/* FIXME - Sending the secret instead of generating on
332340
* the remote. */
333-
marshal_secret(hsm_secret, req.mutable_hsm_secret());
341+
marshal_bip32seed(hsm_secret, req.mutable_hsm_secret());
334342

335343
ClientContext context;
336344
InitReply rsp;

0 commit comments

Comments
 (0)