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:
1 parent
6ad8be25e1
commit
7fe2f9e2a5
1 file changed
+1
-1
+1
-1
@@ -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),
|
||||||
|
|||||||
Reference in new issue
Block a user