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

Function param_msat_as_sat

plugins/funder.c:543–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543static struct command_result *param_msat_as_sat(struct command *cmd,
544 const char *name,
545 const char *buffer,
546 const jsmntok_t *tok,
547 struct amount_sat **sat)
548{
549 struct amount_msat msat;
550
551 *sat = tal(cmd, struct amount_sat);
552 if (parse_amount_msat(&msat, buffer + tok->start, tok->end - tok->start)
553 && amount_msat_to_sat(*sat, msat))
554 return NULL;
555
556 return command_fail_badparam(cmd, name, buffer, tok,
557 "should be a millisatoshi amount");
558}
559
560static struct bitcoin_outpoint *
561previously_reserved(struct bitcoin_outpoint **prev_outs,

Callers

nothing calls this directly

Calls 3

amount_msat_to_satFunction · 0.85
parse_amount_msatFunction · 0.50
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected