| 205 | } |
| 206 | |
| 207 | static const struct preimage *preimage_of(const struct sha256 *hash, |
| 208 | const struct existing_htlc **htlcs) |
| 209 | { |
| 210 | for (size_t i = 0; i < tal_count(htlcs); i++) |
| 211 | if (sha256_eq(hash, &htlcs[i]->payment_hash)) |
| 212 | return htlcs[i]->payment_preimage; |
| 213 | abort(); |
| 214 | } |
| 215 | |
| 216 | static char *sig_as_hex(const struct bitcoin_signature *sig) |
| 217 | { |