rpcserver: correct avg degree in GetNetworkInfo
Average degree of graph is calculated as twice the number of edges devided by number of vertices
This commit is contained in:
parent
6ad8be25e1
commit
7fe2f9e2a5
@ -4033,7 +4033,7 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
|
|||||||
// * also add median channel size
|
// * also add median channel size
|
||||||
netInfo := &lnrpc.NetworkInfo{
|
netInfo := &lnrpc.NetworkInfo{
|
||||||
MaxOutDegree: maxChanOut,
|
MaxOutDegree: maxChanOut,
|
||||||
AvgOutDegree: float64(numChannels) / float64(numNodes),
|
AvgOutDegree: float64(2*numChannels) / float64(numNodes),
|
||||||
NumNodes: numNodes,
|
NumNodes: numNodes,
|
||||||
NumChannels: numChannels,
|
NumChannels: numChannels,
|
||||||
TotalNetworkCapacity: int64(totalNetworkCapacity),
|
TotalNetworkCapacity: int64(totalNetworkCapacity),
|
||||||
|
Loading…
Reference in New Issue
Block a user