Merge pull request #2473 from Roasbeef/list-channels-initiator
lnrpc+rpc: add initiator field to listchannels
This commit is contained in:
4 files changed
+547
-528
No files matched your search
+536
-526
File diff suppressed because it is too large.
Load diff
+4
-1
@@ -1010,8 +1010,11 @@ message Channel {
|
|||||||
*/
|
*/
|
||||||
uint32 csv_delay = 16 [json_name = "csv_delay"];
|
uint32 csv_delay = 16 [json_name = "csv_delay"];
|
||||||
|
|
||||||
/// Whether this channel is advertised to the network or not
|
/// Whether this channel is advertised to the network or not.
|
||||||
bool private = 17 [json_name = "private"];
|
bool private = 17 [json_name = "private"];
|
||||||
|
|
||||||
|
/// True if we were the ones that creted the channel.
|
||||||
|
bool initiator = 18 [json_name = "initiator"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1401,7 +1401,12 @@
|
|||||||
"private": {
|
"private": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"format": "boolean",
|
"format": "boolean",
|
||||||
"title": "/ Whether this channel is advertised to the network or not"
|
"description": "/ Whether this channel is advertised to the network or not."
|
||||||
|
},
|
||||||
|
"initiator": {
|
||||||
|
"type": "boolean",
|
||||||
|
"format": "boolean",
|
||||||
|
"description": "/ True if we were the ones that creted the channel."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2373,6 +2373,7 @@ func (r *rpcServer) ListChannels(ctx context.Context,
|
|||||||
NumUpdates: localCommit.CommitHeight,
|
NumUpdates: localCommit.CommitHeight,
|
||||||
PendingHtlcs: make([]*lnrpc.HTLC, len(localCommit.Htlcs)),
|
PendingHtlcs: make([]*lnrpc.HTLC, len(localCommit.Htlcs)),
|
||||||
CsvDelay: uint32(dbChannel.LocalChanCfg.CsvDelay),
|
CsvDelay: uint32(dbChannel.LocalChanCfg.CsvDelay),
|
||||||
|
Initiator: dbChannel.IsInitiator,
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, htlc := range localCommit.Htlcs {
|
for i, htlc := range localCommit.Htlcs {
|
||||||
|
|||||||
Reference in new issue
Block a user