Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up loop #7

Closed
decanus opened this issue Apr 26, 2019 · 1 comment
Closed

clean up loop #7

decanus opened this issue Apr 26, 2019 · 1 comment
Labels
enhancement An improvement for the platform

Comments

@decanus
Copy link
Contributor

decanus commented Apr 26, 2019

https://github.com/Whiteblock/genesis/blob/dev/status/network.go#L34-L43

So just rough thinking, the shouldAdd isn't needed here, you can simply continue the outer loop if id == node.Server this would practically split loc in half. Also, this can be moved into a new function for clarity.

@zscole zscole added the enhancement An improvement for the platform label Apr 26, 2019
n8wb pushed a commit that referenced this issue Apr 26, 2019
@n8wb
Copy link
Contributor

n8wb commented Apr 26, 2019

We already have a function which handles that, so I will use that instead. Sweet. Although, that function still uses the shouldAdd variable since whether or not to continue is decided in another loop.

@n8wb n8wb closed this as completed May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement for the platform
Projects
None yet
Development

No branches or pull requests

3 participants