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

(3/8) [REFACTOR] P2PDataStore::add/remove/refresh #3557

Merged

Commits on Nov 11, 2019

  1. [BUGFIX] Don't try and remove() if addMailboxData() fails

    Fix a bug where remove() was called in the addMailboxData()
    failure path.
    
    1. Sender's can't remove mailbox entries. Only
       the receiver can remove it so even if the previous add() failed and
       left partial state, the remove() can never succeed.
    
    2. Even if the sender could remove, this path used remove() instead
       of removeMailboxData() so it wouldn't have succeed anyway.
    
    This patch cleans up the failure path as well as adds a precondition
    for the remove() function to ensure future callers don't use them for
    ProtectedMailboxStorageEntrys.
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    de5ffd4 View commit details
    Browse the repository at this point in the history
  2. [REFACTOR] P2PDataStorage::addPersistableNetworkPayload()

    Add comments and refactor the body in order to make it easier to
    understand.
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    5512f34 View commit details
    Browse the repository at this point in the history
  3. [REFACTOR] P2PDataStorage::addProtectedStorageEntry()

    Refactor addProtectedStorageEntry for more readability and add comments
    to help future readers.
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    f2f6399 View commit details
    Browse the repository at this point in the history
  4. [REFACTOR] P2PDataStorage::refreshTTL()

    Refactor for readability and add comments for future readers.
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    ae50270 View commit details
    Browse the repository at this point in the history
  5. [REFACTOR] P2PDataStorage::remove()

    Refactor for readability and add comments to help future readers.
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    a569852 View commit details
    Browse the repository at this point in the history
  6. [REFACTOR] P2PDataStorage::removeMailboxData()

    Refactor for readability and add comments for future readers.
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    66e3ece View commit details
    Browse the repository at this point in the history
  7. [PR COMMENTS] Clean up logging messages

    Removed duplicate log messages that are handled inside the various helper methods
    and print more verbose state useful for debugging.
    
    Updated potentially misleading comments around hashing collisions
    julianknutsen committed Nov 11, 2019
    Copy the full SHA
    86c8c83 View commit details
    Browse the repository at this point in the history