From a2e32ea911556519155aff563e1440df76397da1 Mon Sep 17 00:00:00 2001 From: jbhusson <jonah@elixxir.io> Date: Mon, 25 Oct 2021 12:34:29 -0400 Subject: [PATCH] exclude from number to go as well --- api/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/client.go b/api/client.go index 406efb678..36c95f897 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 -- GitLab