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

Protocol methods refactoring. #182

Merged
merged 16 commits into from
Dec 10, 2019
Merged

Protocol methods refactoring. #182

merged 16 commits into from
Dec 10, 2019

Commits on Dec 6, 2019

  1. 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 committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    be2218d View commit details
    Browse the repository at this point in the history
  2. Addapt main.go gorutines to wG

    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    608cbf1 View commit details
    Browse the repository at this point in the history
  3. Fix typo

    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    e0753c4 View commit details
    Browse the repository at this point in the history
  4. Replace append for copy in setHeadersINFO

    On this way, we speed up the app by copying directly in the stack.
    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    1a2c626 View commit details
    Browse the repository at this point in the history
  5. Fix wrong byte length for ID

    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    368aff4 View commit details
    Browse the repository at this point in the history
  6. Remove formatting from INFO logs

    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    6d52a44 View commit details
    Browse the repository at this point in the history
  7. Fix ID verification of refactoring.

    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    f9f166b View commit details
    Browse the repository at this point in the history
  8. Hold watigroup in Pong arrivals

    CPerezz committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    f8dec50 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2019

  1. 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 committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    a9032c7 View commit details
    Browse the repository at this point in the history
  2. 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 committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    69d1911 View commit details
    Browse the repository at this point in the history
  3. 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 committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    00cbaca View commit details
    Browse the repository at this point in the history
  4. Remove WG from main and protocol params

    CPerezz committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    b3df49a View commit details
    Browse the repository at this point in the history
  5. Refactor contiune loop statements

    CPerezz committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    e3661a2 View commit details
    Browse the repository at this point in the history
  6. Fix setHeaders bug

    CPerezz committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    bcbbedd View commit details
    Browse the repository at this point in the history
  7. 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 committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    8a8d57c View commit details
    Browse the repository at this point in the history
  8. 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 committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    2f74a69 View commit details
    Browse the repository at this point in the history