diff --git a/api/client.go b/api/client.go index 406efb6783c931d62d83e83d877ce44e307501bc..36c95f897b8c1530aea3539e22806070678fa791 100644 --- a/api/client.go +++ b/api/client.go @@ -539,8 +539,10 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) { cmixStore := c.storage.Cmix() var numRegistered int + var numStale = 0 for i, n := range nodes { if n.Status == ndf.Stale { + numStale += 1 continue } nid, err := id.Unmarshal(n.ID) @@ -554,7 +556,7 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) { } // Get the number of in progress node registrations - return numRegistered, len(nodes), nil + return numRegistered, len(nodes) - numStale, nil } // DeleteContact is a function which removes a partner from Client's storage