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
2020-03-28 16:14:26 +01:00
parent a2336005e6
commit 93cb05142a
4 changed files with 719 additions and 713 deletions

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)