mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user