From a00c357854bffd8add6f2a501110df0e56db6ce8 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Jan 2019 14:42:27 +1030 Subject: [PATCH] JSON: remove redundant word "channel" from direction fields. Suggested-by: @cdecker Signed-off-by: Rusty Russell --- CHANGELOG.md | 4 ++-- lightningd/pay.c | 2 +- lightningd/peer_control.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ee55b88..14a711aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - plugins: fully enabled, and ready for you to write some! - lightning-cli: `help ` finds man pages even if `make install` not run. -- JSON API: `waitsendpay` now has an `erring_channel_direction` field. -- JSON API: `listpeers` now has a `channel_direction` field in `channels`. +- JSON API: `waitsendpay` now has an `erring_direction` field. +- JSON API: `listpeers` now has a `direction` field in `channels`. - JSON API: `listchannels` now takes a `source` option to filter by node id. ### Changed diff --git a/lightningd/pay.c b/lightningd/pay.c index ab1c50b20..aed9206f6 100644 --- a/lightningd/pay.c +++ b/lightningd/pay.c @@ -944,7 +944,7 @@ static void json_waitsendpay_on_resolve(const struct sendpay_result *r, json_add_pubkey(data, "erring_node", &fail->erring_node); json_add_short_channel_id(data, "erring_channel", &fail->erring_channel); - json_add_num(data, "erring_channel_direction", + json_add_num(data, "erring_direction", fail->channel_dir); if (fail->channel_update) json_add_hex_talarr(data, "channel_update", diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index c8c2a42db..7fac9a68a 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -707,7 +707,7 @@ static void json_add_peer(struct lightningd *ld, json_add_short_channel_id(response, "short_channel_id", channel->scid); - json_add_num(response, "channel_direction", + json_add_num(response, "direction", pubkey_idx(&ld->id, &p->id)); } derive_channel_id(&cid,