| 246 | } |
| 247 | |
| 248 | static void emit_invalid(bool *first, const char *reason, |
| 249 | secp256k1_keypair *kp, |
| 250 | struct tlv_payer_proof *proof) |
| 251 | { |
| 252 | if (!*first) |
| 253 | printf(",\n"); |
| 254 | *first = false; |
| 255 | /* Signature should be valid (we omit it for one test though) */ |
| 256 | if (kp) { |
| 257 | proof->proof_signature = payer_proof_signature(proof, proof, |
| 258 | sign_payer, kp); |
| 259 | assert(proof->proof_signature); |
| 260 | } |
| 261 | printf("{\"reason\":\"%s\",\"bech32\":\"%s\"}", |
| 262 | reason, payer_proof_encode(tmpctx, proof)); |
| 263 | } |
| 264 | |
| 265 | static void generate_invalid_vectors(struct tlv_invoice *inv, |
| 266 | const struct preimage *preimage) |
nothing calls this directly
no test coverage detected