Browse Source

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.
ppa-0.6.1
Christian Decker 8 years ago
committed by Rusty Russell
parent
commit
9c07376dcf
  1. 8
      lightningd/channel/channel.c

8
lightningd/channel/channel.c

@ -145,9 +145,11 @@ static void send_announcement_signatures(struct peer *peer)
"HSM returned an invalid signature"); "HSM returned an invalid signature");
} }
/* FIXME: Calculate bitcoin sig. */ /* TODO(cdecker) Move this to the HSM once we store the
memset(&peer->announcement_bitcoin_sigs[LOCAL], 0, * funding_privkey there */
sizeof(peer->announcement_bitcoin_sigs[LOCAL])); sign_hash(&peer->our_secrets.funding_privkey, &hash,
&peer->announcement_bitcoin_sigs[LOCAL]);
msg = towire_announcement_signatures( msg = towire_announcement_signatures(
tmpctx, &peer->channel_id, &peer->short_channel_ids[LOCAL], tmpctx, &peer->channel_id, &peer->short_channel_ids[LOCAL],
&peer->announcement_node_sigs[LOCAL], &peer->announcement_node_sigs[LOCAL],

Loading…
Cancel
Save