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
|
||||
netInfo := &lnrpc.NetworkInfo{
|
||||
MaxOutDegree: maxChanOut,
|
||||
AvgOutDegree: float64(numChannels) / float64(numNodes),
|
||||
AvgOutDegree: float64(2*numChannels) / float64(numNodes),
|
||||
NumNodes: numNodes,
|
||||
NumChannels: numChannels,
|
||||
TotalNetworkCapacity: int64(totalNetworkCapacity),
|
||||
|
Loading…
Reference in New Issue
Block a user