Fee base is a u32, but it's convenient to let them specify it using * msat etc. suffix. */
| 3586 | /* Fee base is a u32, but it's convenient to let them specify it using |
| 3587 | * msat etc. suffix. */ |
| 3588 | static struct command_result *param_msat_u32(struct command *cmd, |
| 3589 | const char *name, |
| 3590 | const char *buffer, |
| 3591 | const jsmntok_t *tok, |
| 3592 | u32 **num) |
| 3593 | { |
| 3594 | struct amount_msat *msat; |
| 3595 | struct command_result *res; |
| 3596 | |
| 3597 | /* Parse just like an msat. */ |
| 3598 | res = param_msat(cmd, name, buffer, tok, &msat); |
| 3599 | if (res) |
| 3600 | return res; |
| 3601 | |
| 3602 | *num = tal(cmd, u32); |
| 3603 | if (!amount_msat_to_u32(*msat, *num)) { |
| 3604 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3605 | "exceeds u32 max"); |
| 3606 | } |
| 3607 | |
| 3608 | return NULL; |
| 3609 | } |
| 3610 | |
| 3611 | static void set_channel_config(struct command *cmd, struct channel *channel, |
| 3612 | u32 *base, |
nothing calls this directly
no test coverage detected