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

Function parse_feerate

common/splice_script.c:1553–1579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1551}
1552
1553static bool parse_feerate(struct token *token, u32 *feerate)
1554{
1555 long long result;
1556 char *endptr;
1557 if (!token->str)
1558 return false;
1559
1560 /* zero length feerate is valid and implies 0 */
1561 if (0 == strlen(token->str)) {
1562 *feerate = 0;
1563 return true;
1564 }
1565
1566 /* If no feerate was found, str wont contain feerate */
1567 if (0 == strcmp(token->str, FEE_SYMBOL)) {
1568 *feerate = 0;
1569 return true;
1570 }
1571
1572 errno = 0;
1573 result = strtoll(token->str, &endptr, 10);
1574 if (errno || *endptr)
1575 return false;
1576
1577 *feerate = result;
1578 return true;
1579}
1580
1581static struct splice_script_error *resolve_channel_ids(const tal_t *ctx,
1582 struct splice_script_chan **channels,

Callers 1

parse_splice_scriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected