MCPcopy Create free account
hub / github.com/ElementsProject/lightning / amount_sat_or_u64_option

Function amount_sat_or_u64_option

plugins/funder.c:1211–1228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1209}
1210
1211static 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
1230int main(int argc, char **argv)
1231{

Callers

nothing calls this directly

Calls 3

u64_optionFunction · 0.85
tal_freeFunction · 0.85
parse_amount_satFunction · 0.50

Tested by

no test coverage detected