Fee base is a u32, but it's convenient to let them specify it using * msat etc. suffix. */
| 2493 | /* Fee base is a u32, but it's convenient to let them specify it using |
| 2494 | * msat etc. suffix. */ |
| 2495 | static struct command_result *param_msat_u32(struct command *cmd, |
| 2496 | const char *name, |
| 2497 | const char *buffer, |
| 2498 | const jsmntok_t *tok, |
| 2499 | u32 **num) |
| 2500 | { |
| 2501 | struct amount_msat *msat; |
| 2502 | struct command_result *res; |
| 2503 | |
| 2504 | /* Parse just like an msat. */ |
| 2505 | res = param_msat(cmd, name, buffer, tok, &msat); |
| 2506 | if (res) |
| 2507 | return res; |
| 2508 | |
| 2509 | *num = tal(cmd, u32); |
| 2510 | if (!amount_msat_to_u32(*msat, *num)) { |
| 2511 | return command_fail_badparam(cmd, name, buffer, tok, |
| 2512 | "exceeds u32 max"); |
| 2513 | } |
| 2514 | |
| 2515 | return NULL; |
| 2516 | } |
| 2517 | |
| 2518 | static void set_channel_config(struct command *cmd, struct channel *channel, |
| 2519 | u32 *base, |
nothing calls this directly
no test coverage detected