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

Function param_msat_as_sat

plugins/funder.c:372–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372static struct command_result *param_msat_as_sat(struct command *cmd,
373 const char *name,
374 const char *buffer,
375 const jsmntok_t *tok,
376 struct amount_sat **sat)
377{
378 struct amount_msat msat;
379
380 *sat = tal(cmd, struct amount_sat);
381 if (parse_amount_msat(&msat, buffer + tok->start, tok->end - tok->start)
382 && amount_msat_to_sat(*sat, msat))
383 return NULL;
384
385 return command_fail_badparam(cmd, name, buffer, tok,
386 "should be a millisatoshi amount");
387}
388
389static struct command_result *
390listfunds_success(struct command *cmd,

Callers

nothing calls this directly

Calls 3

amount_msat_to_satFunction · 0.85
command_fail_badparamFunction · 0.85
parse_amount_msatFunction · 0.50

Tested by

no test coverage detected