mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:31:20 +02:00
wtclient+lnrpc: move Stats to Manager
Move the `Stats` method from the `Client` to the `Manager` interface.
This commit is contained in:
@@ -420,19 +420,7 @@ func (c *WatchtowerClient) Stats(_ context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
clientStats := []wtclient.ClientStats{
|
||||
c.cfg.Client.Stats(),
|
||||
c.cfg.AnchorClient.Stats(),
|
||||
}
|
||||
|
||||
var stats wtclient.ClientStats
|
||||
for _, stat := range clientStats {
|
||||
stats.NumTasksAccepted += stat.NumTasksAccepted
|
||||
stats.NumTasksIneligible += stat.NumTasksIneligible
|
||||
stats.NumTasksPending += stat.NumTasksPending
|
||||
stats.NumSessionsAcquired += stat.NumSessionsAcquired
|
||||
stats.NumSessionsExhausted += stat.NumSessionsExhausted
|
||||
}
|
||||
stats := c.cfg.ClientMgr.Stats()
|
||||
|
||||
return &StatsResponse{
|
||||
NumBackups: uint32(stats.NumTasksAccepted),
|
||||
|
Reference in New Issue
Block a user