MCPcopy Create free account
hub / github.com/ElementsProject/lightning / emit_invalid

Function emit_invalid

common/test/run-bolt12_proof_vectors.c:248–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248static 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
265static void generate_invalid_vectors(struct tlv_invoice *inv,
266 const struct preimage *preimage)

Callers

nothing calls this directly

Calls 1

payer_proof_encodeFunction · 0.85

Tested by

no test coverage detected