Merge pull request #1389 from Bluetegu/noprivate-describegraph-1037

Add --noprivate flag to describegraph rpc to filter out private channels
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2018-10-16 20:01:35 -07:00
commit 4c0ca37174
8 files changed
+417 -186

No files matched your search

+12 -2
View File
@@ -2467,7 +2467,15 @@ var describeGraphCommand = cli.Command{
Category: "Peers",
Description: "Prints a human readable version of the known channel " +
"graph from the PoV of the node",
Usage: "Describe the network graph.",
Usage: "Describe the network graph.",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "include_unannounced",
Usage: "If set, unannounced channels will be included in the " +
"graph. Unannounced channels are both private channels, and " +
"public channels that are not yet announced to the network.",
},
},
Action: actionDecorator(describeGraph),
}
@@ -2475,7 +2483,9 @@ func describeGraph(ctx *cli.Context) error {
client, cleanUp := getClient(ctx)
defer cleanUp()
req := &lnrpc.ChannelGraphRequest{}
req := &lnrpc.ChannelGraphRequest{
IncludeUnannounced: ctx.Bool("include_unannounced"),
}
graph, err := client.DescribeGraph(context.Background(), req)
if err != nil {