| 400 | } |
| 401 | |
| 402 | struct tlv_invoice *invoice_decode(const tal_t *ctx, |
| 403 | const char *b12, size_t b12len, |
| 404 | const struct feature_set *our_features, |
| 405 | const struct chainparams *must_be_chain, |
| 406 | char **fail) |
| 407 | { |
| 408 | struct tlv_invoice *invoice; |
| 409 | |
| 410 | invoice = invoice_decode_nosig(ctx, b12, b12len, our_features, |
| 411 | must_be_chain, fail); |
| 412 | if (invoice) { |
| 413 | *fail = check_signature(ctx, invoice->fields, |
| 414 | "invoice", "signature", |
| 415 | invoice->node_id, invoice->signature); |
| 416 | if (*fail) |
| 417 | invoice = tal_free(invoice); |
| 418 | } |
| 419 | return invoice; |
| 420 | } |
| 421 | |
| 422 | static bool bolt12_has_invoice_prefix(const char *str) |
| 423 | { |
no test coverage detected