cmd/lncli: add color border to graph rendering if node's color is set
This commit is contained in:
parent
ad71a62b96
commit
9342a8d27d
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user