Merge pull request #2832 from caldon/avg-out-degree-fix

rpcserver: correct avg degree in GetNetworkInfo
This commit is contained in:
Olaoluwa Osuntokun 2019-03-27 18:11:57 -07:00 committed by GitHub
commit fff003f92e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4043,7 +4043,7 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
// TODO(roasbeef): also add oldest channel?
netInfo := &lnrpc.NetworkInfo{
MaxOutDegree: maxChanOut,
AvgOutDegree: float64(numChannels) / float64(numNodes),
AvgOutDegree: float64(2*numChannels) / float64(numNodes),
NumNodes: numNodes,
NumChannels: numChannels,
TotalNetworkCapacity: int64(totalNetworkCapacity),