short_channel_id: don't accept :-separated in JSON if --allow-deprecated-apis=false

We need to still accept it when parsing the database, but this flag
should allow upgrade testing for devs building on top

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-02-08 09:53:25 +10:30
committed by neil saitug
parent d413fc7e9b
commit b99293fbb6
15 changed files with 40 additions and 20 deletions

View File

@@ -39,8 +39,10 @@ bool json_to_pubkey(const char *buffer, const jsmntok_t *tok,
}
bool json_to_short_channel_id(const char *buffer, const jsmntok_t *tok,
struct short_channel_id *scid)
struct short_channel_id *scid,
bool may_be_deprecated_form)
{
return (short_channel_id_from_str(buffer + tok->start,
tok->end - tok->start, scid));
tok->end - tok->start, scid,
may_be_deprecated_form));
}