Fee base is a u32, but it's convenient to let them specify it using * msat etc. suffix. */
| 3864 | /* Fee base is a u32, but it's convenient to let them specify it using |
| 3865 | * msat etc. suffix. */ |
| 3866 | static struct command_result *param_msat_u32(struct command *cmd, |
| 3867 | const char *name, |
| 3868 | const char *buffer, |
| 3869 | const jsmntok_t *tok, |
| 3870 | u32 **num) |
| 3871 | { |
| 3872 | struct amount_msat *msat; |
| 3873 | struct command_result *res; |
| 3874 | |
| 3875 | /* Parse just like an msat. */ |
| 3876 | res = param_msat(cmd, name, buffer, tok, &msat); |
| 3877 | if (res) |
| 3878 | return res; |
| 3879 | |
| 3880 | *num = tal(cmd, u32); |
| 3881 | if (!amount_msat_to_u32(*msat, *num)) { |
| 3882 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3883 | "exceeds u32 max"); |
| 3884 | } |
| 3885 | |
| 3886 | return NULL; |
| 3887 | } |
| 3888 | |
| 3889 | static void set_channel_config(struct command *cmd, struct channel *channel, |
| 3890 | u32 *base, |
nothing calls this directly
no test coverage detected