JSON: remove handling of pre-Adelaide (B:T:N) short_channel_ids.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-09-06 16:11:41 +09:30
committed by Christian Decker
parent 714e7fb670
commit acf3952acc
17 changed files with 23 additions and 47 deletions

View File

@@ -353,8 +353,7 @@ static struct command_result *json_getroute(struct command *cmd,
json_for_each_arr(i, t, excludetok) {
if (!short_channel_id_dir_from_str(buffer + t->start,
t->end - t->start,
&excluded[i],
deprecated_apis)) {
&excluded[i])) {
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
"%.*s is not a valid"
" short_channel_id/direction",
@@ -548,8 +547,7 @@ static struct command_result *json_dev_query_scids(struct command *cmd,
scids = tal_arr(cmd, struct short_channel_id, scidstok->size);
json_for_each_arr(i, t, scidstok) {
if (!json_to_short_channel_id(buffer, t, &scids[i],
deprecated_apis)) {
if (!json_to_short_channel_id(buffer, t, &scids[i])) {
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
"scid %zu '%.*s' is not an scid",
i, json_tok_full_len(t),

View File

@@ -567,8 +567,7 @@ static struct route_info *unpack_route(const tal_t *ctx,
if (!json_to_node_id(buffer, pubkey, &r->pubkey)
|| !json_to_short_channel_id(buffer, scid,
&r->short_channel_id,
deprecated_apis)
&r->short_channel_id)
|| !json_to_number(buffer, fee_base, &r->fee_base_msat)
|| !json_to_number(buffer, fee_prop,
&r->fee_proportional_millionths)

View File

@@ -140,8 +140,7 @@ struct command_result *param_short_channel_id(struct command *cmd,
struct short_channel_id **scid)
{
*scid = tal(cmd, struct short_channel_id);
if (json_to_short_channel_id(buffer, tok, *scid,
deprecated_apis))
if (json_to_short_channel_id(buffer, tok, *scid))
return NULL;
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,

View File

@@ -1194,8 +1194,7 @@ command_find_channel(struct command *cmd,
"Channel ID not found: '%.*s'",
tok->end - tok->start,
buffer + tok->start);
} else if (json_to_short_channel_id(buffer, tok, &scid,
deprecated_apis)) {
} else if (json_to_short_channel_id(buffer, tok, &scid)) {
list_for_each(&ld->peers, peer, list) {
*channel = peer_active_channel(peer);
if (!*channel)

View File

@@ -249,8 +249,7 @@ bool json_to_node_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
{ fprintf(stderr, "json_to_node_id called!\n"); abort(); }
/* Generated stub for json_to_short_channel_id */
bool json_to_short_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
struct short_channel_id *scid UNNEEDED,
bool may_be_deprecated_form UNNEEDED)
struct short_channel_id *scid UNNEEDED)
{ fprintf(stderr, "json_to_short_channel_id called!\n"); abort(); }
/* Generated stub for kill_uncommitted_channel */
void kill_uncommitted_channel(struct uncommitted_channel *uc UNNEEDED,

View File

@@ -40,8 +40,7 @@ bool json_to_pubkey(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
{ fprintf(stderr, "json_to_pubkey called!\n"); abort(); }
/* Generated stub for json_to_short_channel_id */
bool json_to_short_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
struct short_channel_id *scid UNNEEDED,
bool may_be_deprecated_form UNNEEDED)
struct short_channel_id *scid UNNEEDED)
{ fprintf(stderr, "json_to_short_channel_id called!\n"); abort(); }
/* Generated stub for json_to_txid */
bool json_to_txid(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,