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

Function param_msat_as_sat

plugins/funder.c:502–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502static struct command_result *param_msat_as_sat(struct command *cmd,
503 const char *name,
504 const char *buffer,
505 const jsmntok_t *tok,
506 struct amount_sat **sat)
507{
508 struct amount_msat msat;
509
510 *sat = tal(cmd, struct amount_sat);
511 if (parse_amount_msat(&msat, buffer + tok->start, tok->end - tok->start)
512 && amount_msat_to_sat(*sat, msat))
513 return NULL;
514
515 return command_fail_badparam(cmd, name, buffer, tok,
516 "should be a millisatoshi amount");
517}
518
519static struct bitcoin_outpoint *
520previously_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