| 89 | } |
| 90 | |
| 91 | void towire_existing_htlc(u8 **pptr, const struct existing_htlc *existing) |
| 92 | { |
| 93 | towire_u8(pptr, existing->state); |
| 94 | towire_u64(pptr, existing->id); |
| 95 | towire_amount_msat(pptr, existing->amount); |
| 96 | towire_sha256(pptr, &existing->payment_hash); |
| 97 | towire_u32(pptr, existing->cltv_expiry); |
| 98 | towire(pptr, existing->onion_routing_packet, |
| 99 | sizeof(existing->onion_routing_packet)); |
| 100 | if (existing->payment_preimage) { |
| 101 | towire_bool(pptr, true); |
| 102 | towire_preimage(pptr, existing->payment_preimage); |
| 103 | } else |
| 104 | towire_bool(pptr, false); |
| 105 | if (existing->failed) { |
| 106 | towire_bool(pptr, true); |
| 107 | towire_failed_htlc(pptr, existing->failed); |
| 108 | } else |
| 109 | towire_bool(pptr, false); |
| 110 | if (existing->blinding) { |
| 111 | towire_bool(pptr, true); |
| 112 | towire_pubkey(pptr, existing->blinding); |
| 113 | } else |
| 114 | towire_bool(pptr, false); |
| 115 | } |
| 116 | |
| 117 | void towire_simple_htlc(u8 **pptr, const struct simple_htlc *simple) |
| 118 | { |
nothing calls this directly
no test coverage detected