lncli: Add graphical output of routing table
LIGHT-131, LIGHT-140, LIGHT-138 `lncli showroutingtable` may output routing table as image. Use graphviz for graph rendering. Add explicit version dependency for tools. Add error checking.
This commit is contained in:
1 parent
d8bceb16f9
commit
2bcff188e8
8 files changed
+347
-166
No files matched your search
+7
-7
@@ -512,15 +512,15 @@ func (r *rpcServer) ShowRoutingTable(ctx context.Context,
|
||||
in *lnrpc.ShowRoutingTableRequest) (*lnrpc.ShowRoutingTableResponse, error) {
|
||||
rpcsLog.Debugf("[ShowRoutingTable]")
|
||||
rtCopy := r.server.routingMgr.GetRTCopy()
|
||||
channels := make([]*lnrpc.RTChannel, 0)
|
||||
channels := make([]*lnrpc.RoutingTableLink, 0)
|
||||
for _, channel := range rtCopy.AllChannels() {
|
||||
channels = append(channels,
|
||||
&lnrpc.RTChannel{
|
||||
Id1: channel.Id1.String(),
|
||||
Id2: channel.Id2.String(),
|
||||
EdgeID: channel.EdgeID.String(),
|
||||
Capacity: channel.Info.Capacity(),
|
||||
Weight: channel.Info.Weight(),
|
||||
&lnrpc.RoutingTableLink{
|
||||
Id1: channel.Id1.String(),
|
||||
Id2: channel.Id2.String(),
|
||||
Outpoint: channel.EdgeID.String(),
|
||||
Capacity: channel.Info.Capacity(),
|
||||
Weight: channel.Info.Weight(),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user