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

Function u64_option

plugins/libplugin.c:1622–1637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1620}
1621
1622char *u64_option(struct command *cmd, const char *arg, bool check_only, u64 *i)
1623{
1624 char *endp;
1625 u64 v;
1626
1627 /* This is how the manpage says to do it. Yech. */
1628 errno = 0;
1629 v = strtoul(arg, &endp, 0);
1630 if (*endp || !arg[0])
1631 return tal_fmt(tmpctx, "'%s' is not a number", arg);
1632 if (errno)
1633 return tal_fmt(tmpctx, "'%s' is out of range", arg);
1634 if (!check_only)
1635 *i = v;
1636 return NULL;
1637}
1638
1639char *u32_option(struct command *cmd, const char *arg, bool check_only, u32 *i)
1640{

Callers 5

u32_optionFunction · 0.85
u16_optionFunction · 0.85
cycle_seconds_optionFunction · 0.85
param_policy_modFunction · 0.85
amount_sat_or_u64_optionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected