mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-22 06:24:22 +01:00
plugins/topology: add direction field to listchannels.
It's a core concept in the spec which isn't directly exposed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `listchannels` added a `direction` field (0 or 1) as per gossip specification.
This commit is contained in:
committed by
Alex Myers
parent
611795beee
commit
9ab488fc41
@@ -36,6 +36,7 @@ On success, an object containing **channels** is returned. It is an array of ob
|
||||
- **source** (pubkey): the source node
|
||||
- **destination** (pubkey): the destination node
|
||||
- **short\_channel\_id** (short\_channel\_id): short channel id of channel
|
||||
- **direction** (u32): direction (0 if source < destination, 1 otherwise).
|
||||
- **public** (boolean): true if this is announced (otherwise it must be our channel)
|
||||
- **amount\_msat** (msat): the total capacity of this channel (always a whole number of satoshis)
|
||||
- **message\_flags** (u8): as defined by BOLT #7
|
||||
@@ -79,4 +80,4 @@ Lightning RFC site
|
||||
- BOLT \#7:
|
||||
<https://github.com/lightning/bolts/blob/master/07-routing-gossip.md>
|
||||
|
||||
[comment]: # ( SHA256STAMP:d8d52272963a9ec4708fd3ae41585ddd8120bb5444c03219a7b728f0b2e09ec3)
|
||||
[comment]: # ( SHA256STAMP:78f59780528ae5cd33c3607ed11b128cc94e1e0a5e2babd59cb99574a3f5f956)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"source",
|
||||
"destination",
|
||||
"short_channel_id",
|
||||
"direction",
|
||||
"public",
|
||||
"amount_msat",
|
||||
"message_flags",
|
||||
@@ -40,6 +41,10 @@
|
||||
"type": "short_channel_id",
|
||||
"description": "short channel id of channel"
|
||||
},
|
||||
"direction": {
|
||||
"type": "u32",
|
||||
"description": "direction (0 if source < destination, 1 otherwise)."
|
||||
},
|
||||
"public": {
|
||||
"type": "boolean",
|
||||
"description": "true if this is announced (otherwise it must be our channel)"
|
||||
|
||||
Reference in New Issue
Block a user