| 370 | } |
| 371 | |
| 372 | static 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 | |
| 389 | static struct command_result * |
| 390 | listfunds_success(struct command *cmd, |
nothing calls this directly
no test coverage detected