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

Function parse_fallback

lightningd/invoice.c:499–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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