mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
config: replace accept-htlc-tlv-types with accept-htlc-tlv-type
We use multi-specifiable options elsewhere, this is just another. Otherwise you can't add, you can only set them all. Changelog-Added: Config: `accept-htlc-tlv-type` (replaces awkward-to-use `accept-htlc-tlv-types`) Changelog-Deprecated: Config: `accept-htlc-tlv-types` (use `accept-htlc-tlv-type` multiple times) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -709,27 +709,6 @@ json_to_blinded_path(const tal_t *ctx, const char *buffer, const jsmntok_t *tok)
|
||||
return rpath;
|
||||
}
|
||||
|
||||
bool json_to_uintarr(const char *buffer, const jsmntok_t *tok, u64 **dest)
|
||||
{
|
||||
char *str = json_strdup(NULL, buffer, tok);
|
||||
char *endp, **elements = tal_strsplit(str, str, ",", STR_NO_EMPTY);
|
||||
unsigned long long l;
|
||||
u64 u;
|
||||
for (int i = 0; elements[i] != NULL; i++) {
|
||||
/* This is how the manpage says to do it. Yech. */
|
||||
errno = 0;
|
||||
l = strtoull(elements[i], &endp, 0);
|
||||
if (*endp || !str[0])
|
||||
return tal_fmt(NULL, "'%s' is not a number", elements[i]);
|
||||
u = l;
|
||||
if (errno || u != l)
|
||||
return tal_fmt(NULL, "'%s' is out of range", elements[i]);
|
||||
tal_arr_expand(dest, u);
|
||||
}
|
||||
tal_free(str);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
json_tok_channel_id(const char *buffer, const jsmntok_t *tok,
|
||||
struct channel_id *cid)
|
||||
|
||||
Reference in New Issue
Block a user