Returns failmsg on failure, tallocated off ctx */
| 757 | |
| 758 | /* Returns failmsg on failure, tallocated off ctx */ |
| 759 | static const u8 *send_onion(const tal_t *ctx, struct lightningd *ld, |
| 760 | const struct onionpacket *packet, |
| 761 | const struct route_hop *first_hop, |
| 762 | const struct amount_msat final_amount, |
| 763 | const struct sha256 *payment_hash, |
| 764 | const struct pubkey *blinding, |
| 765 | u64 partid, |
| 766 | u64 groupid, |
| 767 | struct channel *channel, |
| 768 | struct htlc_out **hout) |
| 769 | { |
| 770 | const u8 *onion; |
| 771 | unsigned int base_expiry; |
| 772 | |
| 773 | base_expiry = get_block_height(ld->topology) + 1; |
| 774 | onion = serialize_onionpacket(tmpctx, packet); |
| 775 | return send_htlc_out(ctx, channel, first_hop->amount, |
| 776 | base_expiry + first_hop->delay, |
| 777 | final_amount, payment_hash, |
| 778 | blinding, partid, groupid, onion, NULL, hout); |
| 779 | } |
| 780 | |
| 781 | static struct command_result *check_offer_usage(struct command *cmd, |
| 782 | const struct sha256 *local_offer_id) |
no test coverage detected