mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
channeld: Use local secret to generate bitcoin signature
This key will eventually migrate to the HSM, but for now it's in the channeld so we generate the signature there.
This commit is contained in:
parent
20716ad29b
commit
9c07376dcf
1 changed files with 5 additions and 3 deletions
|
@ -145,9 +145,11 @@ static void send_announcement_signatures(struct peer *peer)
|
|||
"HSM returned an invalid signature");
|
||||
}
|
||||
|
||||
/* FIXME: Calculate bitcoin sig. */
|
||||
memset(&peer->announcement_bitcoin_sigs[LOCAL], 0,
|
||||
sizeof(peer->announcement_bitcoin_sigs[LOCAL]));
|
||||
/* TODO(cdecker) Move this to the HSM once we store the
|
||||
* funding_privkey there */
|
||||
sign_hash(&peer->our_secrets.funding_privkey, &hash,
|
||||
&peer->announcement_bitcoin_sigs[LOCAL]);
|
||||
|
||||
msg = towire_announcement_signatures(
|
||||
tmpctx, &peer->channel_id, &peer->short_channel_ids[LOCAL],
|
||||
&peer->announcement_node_sigs[LOCAL],
|
||||
|
|
Loading…
Add table
Reference in a new issue