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

Function parse_fallback

lightningd/invoice.c:523–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523static struct command_result *parse_fallback(struct command *cmd,
524 const char *buffer,
525 const jsmntok_t *fallback,
526 const u8 **fallback_script)
527
528{
529 enum address_parse_result fallback_parse;
530
531 fallback_parse
532 = json_to_address_scriptpubkey(cmd,
533 chainparams,
534 buffer, fallback,
535 fallback_script);
536 if (fallback_parse == ADDRESS_PARSE_UNRECOGNIZED) {
537 return command_fail(cmd, LIGHTNINGD,
538 "Fallback address not valid");
539 } else if (fallback_parse == ADDRESS_PARSE_WRONG_NETWORK) {
540 return command_fail(cmd, LIGHTNINGD,
541 "Fallback address does not match our network %s",
542 chainparams->network_name);
543 }
544 return NULL;
545}
546
547/*
548 * From array of incoming channels [inchan], find suitable ones for

Callers 1

json_invoiceFunction · 0.70

Calls 2

command_failFunction · 0.70

Tested by

no test coverage detected