| 25 | } |
| 26 | |
| 27 | struct simple_htlc *new_simple_htlc(const tal_t *ctx, |
| 28 | enum side side, |
| 29 | struct amount_msat amount, |
| 30 | const struct sha256 *payment_hash, |
| 31 | u32 cltv_expiry) |
| 32 | { |
| 33 | struct simple_htlc *simple = tal(ctx, struct simple_htlc); |
| 34 | simple->side = side; |
| 35 | simple->amount = amount; |
| 36 | simple->payment_hash = *payment_hash; |
| 37 | simple->cltv_expiry = cltv_expiry; |
| 38 | return simple; |
| 39 | } |
| 40 | |
| 41 | struct existing_htlc *new_existing_htlc(const tal_t *ctx, |
| 42 | u64 id, |