Skip to content
Snippets Groups Projects
Commit e183157c authored by Jonah Husson's avatar Jonah Husson
Browse files

Move status check after unmarshal

parent a2e32ea9
No related branches found
No related tags found
2 merge requests!67Release,!63Exclude stale nodes from numRegistered
......@@ -541,15 +541,15 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) {
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)
if err != nil {
return 0, 0, errors.Errorf("Failed to unmarshal node ID %v "+
"(#%d): %s", n.ID, i, err.Error())
}
if n.Status == ndf.Stale {
numStale += 1
continue
}
if cmixStore.Has(nid) {
numRegistered++
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment