mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
libplugin: don't be so strict on msat fields.
Let the parsing handle if they're the wrong type (soon they'll be u64). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
98c264de66
commit
993f44f289
2 changed files with 3 additions and 3 deletions
|
@ -916,7 +916,7 @@ static struct payment_result *tal_sendpay_result_from_json(const tal_t *ctx,
|
||||||
/* Initial sanity checks, all these fields must exist. */
|
/* Initial sanity checks, all these fields must exist. */
|
||||||
if (idtok == NULL || idtok->type != JSMN_PRIMITIVE ||
|
if (idtok == NULL || idtok->type != JSMN_PRIMITIVE ||
|
||||||
hashtok == NULL || hashtok->type != JSMN_STRING ||
|
hashtok == NULL || hashtok->type != JSMN_STRING ||
|
||||||
senttok == NULL || senttok->type != JSMN_STRING ||
|
senttok == NULL ||
|
||||||
statustok == NULL || statustok->type != JSMN_STRING) {
|
statustok == NULL || statustok->type != JSMN_STRING) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1591,8 +1591,8 @@ static struct listpeers_channel *json_to_listpeers_channel(const tal_t *ctx,
|
||||||
ftxidtok == NULL || ftxidtok->type != JSMN_STRING ||
|
ftxidtok == NULL || ftxidtok->type != JSMN_STRING ||
|
||||||
(scidtok != NULL && scidtok->type != JSMN_STRING) ||
|
(scidtok != NULL && scidtok->type != JSMN_STRING) ||
|
||||||
(dirtok != NULL && dirtok->type != JSMN_PRIMITIVE) ||
|
(dirtok != NULL && dirtok->type != JSMN_PRIMITIVE) ||
|
||||||
tmsattok == NULL || tmsattok->type != JSMN_STRING ||
|
tmsattok == NULL ||
|
||||||
smsattok == NULL || smsattok->type != JSMN_STRING)
|
smsattok == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
chan = tal(ctx, struct listpeers_channel);
|
chan = tal(ctx, struct listpeers_channel);
|
||||||
|
|
Loading…
Add table
Reference in a new issue