| 1209 | } |
| 1210 | |
| 1211 | static char *amount_sat_or_u64_option(const char *arg, u64 *amt) |
| 1212 | { |
| 1213 | struct amount_sat sats; |
| 1214 | char *err; |
| 1215 | |
| 1216 | err = u64_option(arg, amt); |
| 1217 | if (err) { |
| 1218 | tal_free(err); |
| 1219 | if (!parse_amount_sat(&sats, arg, strlen(arg))) |
| 1220 | return tal_fmt(NULL, |
| 1221 | "Unable to parse option '%s'", |
| 1222 | arg); |
| 1223 | |
| 1224 | *amt = sats.satoshis; /* Raw: convert to u64 */ |
| 1225 | } |
| 1226 | |
| 1227 | return NULL; |
| 1228 | } |
| 1229 | |
| 1230 | int main(int argc, char **argv) |
| 1231 | { |
nothing calls this directly
no test coverage detected