| 128 | } |
| 129 | |
| 130 | static u8 *make_v0_hop(const tal_t *ctx, |
| 131 | const struct short_channel_id *scid, |
| 132 | struct amount_msat forward, u32 outgoing_cltv) |
| 133 | { |
| 134 | const u8 padding[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 135 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; |
| 136 | /* Prepend 0 byte for realm */ |
| 137 | u8 *buf = tal_arrz(ctx, u8, 1); |
| 138 | towire_short_channel_id(&buf, *scid); |
| 139 | towire_amount_msat(&buf, forward); |
| 140 | towire_u32(&buf, outgoing_cltv); |
| 141 | towire(&buf, padding, ARRAY_SIZE(padding)); |
| 142 | assert(tal_bytelen(buf) == 1 + 32); |
| 143 | return buf; |
| 144 | } |
| 145 | |
| 146 | void sphinx_add_v0_hop(struct sphinx_path *path, const struct pubkey *pubkey, |
| 147 | const struct short_channel_id *scid, |
no test coverage detected