cmd/lncli: add color border to graph rendering if node's color is set

This commit is contained in:
Olaoluwa Osuntokun 2017-12-02 18:42:12 -08:00
parent ad71a62b96
commit 9342a8d27d
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -1429,7 +1429,13 @@ func drawChannelGraph(graph *lnrpc.ChannelGraph) error {
// TODO(roasbeef): should be able to get around this? // TODO(roasbeef): should be able to get around this?
nodeID := fmt.Sprintf(`"%v"`, truncateStr(node.PubKey, numKeyChars)) nodeID := fmt.Sprintf(`"%v"`, truncateStr(node.PubKey, numKeyChars))
graphCanvas.AddNode(graphName, nodeID, gographviz.Attrs{}) attrs := gographviz.Attrs{}
if node.Color != "" {
attrs["color"] = fmt.Sprintf(`"%v"`, node.Color)
}
graphCanvas.AddNode(graphName, nodeID, attrs)
} }
normalize := normalizeFunc(graph.Edges, 3) normalize := normalizeFunc(graph.Edges, 3)