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

Function parse_fallback

lightningd/invoice.c:500–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500static struct command_result *parse_fallback(struct command *cmd,
501 const char *buffer,
502 const jsmntok_t *fallback,
503 const u8 **fallback_script)
504
505{
506 enum address_parse_result fallback_parse;
507
508 fallback_parse
509 = json_to_address_scriptpubkey(cmd,
510 chainparams,
511 buffer, fallback,
512 fallback_script);
513 if (fallback_parse == ADDRESS_PARSE_UNRECOGNIZED) {
514 return command_fail(cmd, LIGHTNINGD,
515 "Fallback address not valid");
516 } else if (fallback_parse == ADDRESS_PARSE_WRONG_NETWORK) {
517 return command_fail(cmd, LIGHTNINGD,
518 "Fallback address does not match our network %s",
519 chainparams->network_name);
520 }
521 return NULL;
522}
523
524/*
525 * 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