mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 17:44:20 +01:00
listpeers: show channel direction for each outgoing channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
be64dd84ca
commit
8738940a8f
@@ -12,6 +12,7 @@ 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 <cmd>` 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`.
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -703,10 +703,13 @@ static void json_add_peer(struct lightningd *ld,
|
||||
if (channel->owner)
|
||||
json_add_string(response, "owner",
|
||||
channel->owner->name);
|
||||
if (channel->scid)
|
||||
if (channel->scid) {
|
||||
json_add_short_channel_id(response,
|
||||
"short_channel_id",
|
||||
channel->scid);
|
||||
json_add_num(response, "channel_direction",
|
||||
pubkey_idx(&ld->id, &p->id));
|
||||
}
|
||||
derive_channel_id(&cid,
|
||||
&channel->funding_txid,
|
||||
channel->funding_outnum);
|
||||
|
||||
Reference in New Issue
Block a user