| 217 | } |
| 218 | |
| 219 | struct added_htlc *fromwire_added_htlc(const tal_t *ctx, const u8 **cursor, |
| 220 | size_t *max) |
| 221 | { |
| 222 | struct added_htlc *added = tal(ctx, struct added_htlc); |
| 223 | added->id = fromwire_u64(cursor, max); |
| 224 | added->amount = fromwire_amount_msat(cursor, max); |
| 225 | fromwire_sha256(cursor, max, &added->payment_hash); |
| 226 | added->cltv_expiry = fromwire_u32(cursor, max); |
| 227 | fromwire(cursor, max, added->onion_routing_packet, |
| 228 | sizeof(added->onion_routing_packet)); |
| 229 | if (fromwire_bool(cursor, max)) { |
| 230 | added->path_key = tal(added, struct pubkey); |
| 231 | fromwire_pubkey(cursor, max, added->path_key); |
| 232 | } else |
| 233 | added->path_key = NULL; |
| 234 | if (fromwire_bool(cursor, max)) { |
| 235 | added->extra_tlvs = fromwire_len_and_tlvstream(added, cursor, max); |
| 236 | } else |
| 237 | added->extra_tlvs = NULL; |
| 238 | added->fail_immediate = fromwire_bool(cursor, max); |
| 239 | return added; |
| 240 | } |
| 241 | |
| 242 | struct existing_htlc *fromwire_existing_htlc(const tal_t *ctx, |
| 243 | const u8 **cursor, size_t *max) |
nothing calls this directly
no test coverage detected