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

Function u64_option

plugins/libplugin.c:1612–1627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610}
1611
1612char *u64_option(struct command *cmd, const char *arg, bool check_only, u64 *i)
1613{
1614 char *endp;
1615 u64 v;
1616
1617 /* This is how the manpage says to do it. Yech. */
1618 errno = 0;
1619 v = strtoul(arg, &endp, 0);
1620 if (*endp || !arg[0])
1621 return tal_fmt(tmpctx, "'%s' is not a number", arg);
1622 if (errno)
1623 return tal_fmt(tmpctx, "'%s' is out of range", arg);
1624 if (!check_only)
1625 *i = v;
1626 return NULL;
1627}
1628
1629char *u32_option(struct command *cmd, const char *arg, bool check_only, u32 *i)
1630{

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