rpcserver: query and set num_zombie_chans in NetworkInfo resp
This commit is contained in:
parent
0223039fb4
commit
97d8be7f6a
@ -3999,6 +3999,12 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Query the graph for the current number of zombie channels.
|
||||
numZombies, err := graph.NumZombies()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Find the median.
|
||||
medianChanSize = autopilot.Median(allChans)
|
||||
|
||||
@ -4022,6 +4028,7 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
|
||||
MinChannelSize: int64(minChannelSize),
|
||||
MaxChannelSize: int64(maxChannelSize),
|
||||
MedianChannelSizeSat: int64(medianChanSize),
|
||||
NumZombieChans: numZombies,
|
||||
}
|
||||
|
||||
// Similarly, if we don't have any channels, then we'll also set the
|
||||
|
Loading…
Reference in New Issue
Block a user