commit bde59d98f74856a1e134c4bf314fc28f71423196
parent b2e77e3d0c4dea784da61e0f5a9eae37a8e3bb76
Author: William Casarin <jb55@jb55.com>
Date: Wed, 29 May 2019 15:23:05 -0700
fix parsing channel json
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/json.c b/json.c
@@ -39,7 +39,7 @@ static const struct channel_parser channel_parsers[] = {
{ "short_channel_id", PARSING_CHAN_SHORTID },
{ "public", PARSING_CHAN_PUBLIC },
{ "satoshis", PARSING_CHAN_SATOSHIS },
- { "flags", PARSING_CHAN_FLAGS },
+ { "channel_flags", PARSING_CHAN_FLAGS },
{ "active", PARSING_CHAN_ACTIVE },
{ "last_update", PARSING_CHAN_LAST_UPDATE },
{ "base_fee_millisatoshi", PARSING_CHAN_BASE_FEE },
@@ -87,7 +87,7 @@ static int parse_short_channel_id(int toklen, const char *tokstr,
char buf[toklen + 1];
buf[toklen] = '\0';
memcpy(buf, tokstr, toklen);
- return sscanf(buf, "%u:%u:%hu",
+ return sscanf(buf, "%ux%ux%hu",
&chanid->blocknum,
&chanid->txnum,
&chanid->outnum);