| 471 | } |
| 472 | |
| 473 | static 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 */ |
| 490 | static void send_private_cupdate(struct channel *channel, bool even_if_redundant) |
no test coverage detected