| 1200 | } |
| 1201 | |
| 1202 | static char *opt_set_sat(const char *arg, struct amount_sat *sat) |
| 1203 | { |
| 1204 | struct amount_msat msat; |
| 1205 | if (!parse_amount_msat(&msat, arg, strlen(arg))) |
| 1206 | return tal_fmt(NULL, "Unable to parse millisatoshi '%s'", arg); |
| 1207 | if (!amount_msat_to_sat(sat, msat)) |
| 1208 | return tal_fmt(NULL, "'%s' is not a whole number of sats", arg); |
| 1209 | return NULL; |
| 1210 | } |
| 1211 | |
| 1212 | static char *opt_set_sat_nondust(const char *arg, struct amount_sat *sat) |
| 1213 | { |
no test coverage detected