-
Notifications
You must be signed in to change notification settings - Fork 47
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
Protocol methods refactoring. #182
Commits on Dec 6, 2019
-
Implement basic skeleton for WaitGroups
Since `Sleep` was not an option as discussed in #141, the waitGroup has been implemented in order to make the program itself trigger the protocol methods once a packet type in concrete is received. Also, added state-vars in order to force the `packetProcessor` gorutine to just activate the waitGroup if a bootstrapping or network discovery process is in progress. Now we need to add timeouts in order to prevent the app to get stucked at any protocol method execution.
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for be2218d - Browse repository at this point
Copy the full SHA be2218dView commit details -
Addapt main.go gorutines to wG
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 608cbf1 - Browse repository at this point
Copy the full SHA 608cbf1View commit details -
CPerezz committed
Dec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for e0753c4 - Browse repository at this point
Copy the full SHA e0753c4View commit details -
Replace
append
forcopy
insetHeadersINFO
On this way, we speed up the app by copying directly in the stack.
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 1a2c626 - Browse repository at this point
Copy the full SHA 1a2c626View commit details -
CPerezz committed
Dec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 368aff4 - Browse repository at this point
Copy the full SHA 368aff4View commit details -
Remove formatting from INFO logs
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 6d52a44 - Browse repository at this point
Copy the full SHA 6d52a44View commit details -
Fix ID verification of refactoring.
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for f9f166b - Browse repository at this point
Copy the full SHA f9f166bView commit details -
Hold watigroup in Pong arrivals
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for f8dec50 - Browse repository at this point
Copy the full SHA f8dec50View commit details
Commits on Dec 8, 2019
-
Remove global state conditions on PONG handler
Now that we are using a different aproach with waitgroups, we can get rid of this state variables.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for a9032c7 - Browse repository at this point
Copy the full SHA a9032c7View commit details -
Implement poll functions for Router
Now the `Router` provides blocking methods to poll Bootstrapp node and closestPeers (FIND_NODES) to allow a better and more logical library construction also featuring waitGroups and removing the timeouts.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 69d1911 - Browse repository at this point
Copy the full SHA 69d1911View commit details -
Refactor protocol methods to work with poll methds
Now that the `Router` offers blocking methods to search for the closest `alpha` peers and for polling the bootstrapping nodes, the logic can be leaved there and the protocol functions just take car of the logic of the algorithms itself.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 00cbaca - Browse repository at this point
Copy the full SHA 00cbacaView commit details -
Remove WG from main and protocol params
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for b3df49a - Browse repository at this point
Copy the full SHA b3df49aView commit details -
Refactor contiune loop statements
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for e3661a2 - Browse repository at this point
Copy the full SHA e3661a2View commit details -
CPerezz committed
Dec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for bcbbedd - Browse repository at this point
Copy the full SHA bcbbeddView commit details -
Modify time.Afterfunc structure
We should not send the poll messages inside of the afterFunc, instead, we should send the messages on polling methods and wait on the afterFunc to execute the getters to our tree.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 8a8d57c - Browse repository at this point
Copy the full SHA 8a8d57cView commit details -
Reduce waitGroup times to speed up polling
With lower timings we should be able to get all of the info we are expecting on the polling methods.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 2f74a69 - Browse repository at this point
Copy the full SHA 2f74a69View commit details