[bisq-network/bisq] (3/4) [REFACTOR] P2PDataStore::add/remove/refresh (#3557)

Julian Knutsen notifications at github.com
Mon Nov 4 19:30:17 UTC 2019


Improve clarity and add comments for future readers to help them reason about the behavior.

This also paves the way for deduplicating the remove() paths and helps identify the shared code paths
that can be merged in future refactoring work.


You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/3557

-- Commit Summary --

  * [TESTS] Add tests for P2PDataStorage in order to safely refactor
  * [BUGFIX] Call correct remove function in addMailboxData failure path.
  * [REFACTOR] P2PDataStorage::addPersistableNetworkPayload()
  * [REFACTOR] P2PDataStorage::addProtectedStorageEntry()
  * [REFACTOR] P2PDataStorage::refreshTTL()
  * [REFACTOR] P2PDataStorage::remove()
  * [REFACTOR] P2PDataStorage::removeMailboxData()

-- File Changes --

    M build.gradle (1)
    M core/src/main/java/bisq/core/alert/Alert.java (2)
    M p2p/src/main/java/bisq/network/p2p/P2PService.java (10)
    M p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java (353)
    M p2p/src/test/java/bisq/network/p2p/storage/P2PDataStorageTest.java (1491)
    A p2p/src/test/java/bisq/network/p2p/storage/mocks/AppendOnlyDataStoreServiceFake.java (42)
    A p2p/src/test/java/bisq/network/p2p/storage/mocks/DateTolerantPayloadStub.java (50)
    A p2p/src/test/java/bisq/network/p2p/storage/mocks/PersistableNetworkPayloadStub.java (43)
    A p2p/src/test/java/bisq/network/p2p/storage/mocks/ProtectedDataStoreServiceFake.java (45)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/3557.patch
https://github.com/bisq-network/bisq/pull/3557.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3557
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191104/d13e16e5/attachment.html>


More information about the bisq-github mailing list