MCPcopy Create free account
hub / github.com/ElementsProject/lightning / sign_update

Function sign_update

lightningd/channel_gossip.c:473–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473static u8 *sign_update(const tal_t *ctx,
474 struct lightningd *ld,
475 const u8 *unsigned_cupdate)
476{
477 const u8 *msg;
478 u8 *signed_update;
479
480 /* Sign it please! */
481 msg = hsm_sync_req(tmpctx, ld,
482 take(towire_hsmd_cupdate_sig_req(NULL, unsigned_cupdate)));
483
484 if (!fromwire_hsmd_cupdate_sig_reply(ctx, msg, &signed_update))
485 fatal("Reading cupdate_sig_reply: %s", tal_hex(tmpctx, msg));
486 return signed_update;
487}
488
489/* Try to send a channel_update direct to peer, unless redundant */
490static void send_private_cupdate(struct channel *channel, bool even_if_redundant)

Callers 2

send_private_cupdateFunction · 0.85
update_channel_updateFunction · 0.85

Calls 5

tal_hexFunction · 0.85
hsm_sync_reqFunction · 0.70
fatalFunction · 0.70

Tested by

no test coverage detected