lnrpc: rename FloatValue to FloatMetric

This commit renames lnrpc.FloatValue to lnrpc.FloatMetric as requested
in the final review of centrality PR.
This commit is contained in:
Andras Banki-Horvath committed 2020-03-30 16:36:11 +02:00
1 parent a2336005e6
commit 93cb05142a
4 files changed
+719 -713

No files matched your search

+5 -4
View File
@@ -4688,7 +4688,7 @@ func (r *rpcServer) GetNodeMetrics(ctx context.Context,
}
resp := &lnrpc.NodeMetricsResponse{
BetweennessCentrality: make(map[string]*lnrpc.FloatValue),
BetweennessCentrality: make(map[string]*lnrpc.FloatMetric),
}
// Obtain the pointer to the global singleton channel graph, this will
@@ -4712,9 +4712,10 @@ func (r *rpcServer) GetNodeMetrics(ctx context.Context,
// Fill normalized and non normalized centrality.
centrality := centralityMetric.GetMetric(true)
for nodeID, val := range centrality {
resp.BetweennessCentrality[hex.EncodeToString(nodeID[:])] = &lnrpc.FloatValue{
NormalizedValue: val,
}
resp.BetweennessCentrality[hex.EncodeToString(nodeID[:])] =
&lnrpc.FloatMetric{
NormalizedValue: val,
}
}
centrality = centralityMetric.GetMetric(false)