| 368 | } |
| 369 | |
| 370 | static struct command_result *param_b12_invreq(struct command *cmd, |
| 371 | const char *name, |
| 372 | const char *buffer, |
| 373 | const jsmntok_t *tok, |
| 374 | struct tlv_invoice_request **invreq) |
| 375 | { |
| 376 | char *fail; |
| 377 | |
| 378 | *invreq = invrequest_decode(cmd, buffer + tok->start, |
| 379 | tok->end - tok->start, |
| 380 | cmd->ld->our_features, chainparams, &fail); |
| 381 | if (!*invreq) |
| 382 | return command_fail_badparam(cmd, name, buffer, tok, fail); |
| 383 | #if !DEVELOPER |
| 384 | /* We use this for testing with known payer_info */ |
| 385 | if ((*invreq)->payer_info) |
| 386 | return command_fail_badparam(cmd, name, buffer, tok, |
| 387 | "must not have payer_info"); |
| 388 | #endif |
| 389 | if ((*invreq)->payer_key) |
| 390 | return command_fail_badparam(cmd, name, buffer, tok, |
| 391 | "must not have payer_key"); |
| 392 | return NULL; |
| 393 | } |
| 394 | |
| 395 | static bool payer_key(struct lightningd *ld, |
| 396 | const u8 *public_tweak, size_t public_tweak_len, |
nothing calls this directly
no test coverage detected