-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
(6/6) Clean up technical debt in P2PDataStorage and ProtectedStorageEntry objects #3747
Merged
ripcurlx
merged 51 commits into
bisq-network:master
from
julianknutsen:clean-up-pse-objs
Dec 9, 2019
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
5fcd18c
[TESTS] Add tests of requestData
julianknutsen 1e814d9
[REFACTOR] Introduce buildGetDataRequest variants
julianknutsen a927ed4
[TESTS] Add tests of new RequestData APIs
julianknutsen daffe6d
[TESTS] Add tests of GetDataRequestHandler
julianknutsen 944b3ff
[REFACTOR] Introduce buildGetDataResponse
julianknutsen 8208f78
[REFACTOR] Extract connectionInfo String
julianknutsen 5402155
[REFACTOR] Extract getDataResponse logging
julianknutsen a6e8868
[REFACTOR] Extract truncation logging
julianknutsen dafc762
[REFACTOR] Pass peerCapabilities into buildGetDataResponse
julianknutsen 5630b35
[TESTS] Unit tests of buildGetDataResponse
julianknutsen caf946d
Remove redundant HashSet lookups in filter functions
julianknutsen 703a9a0
[REFACTOR] Move required capabilities log
julianknutsen 3aaf8a2
[REFACTOR] Inline capability check for ProtectedStorageEntries
julianknutsen 4c5d818
[REFACTOR] Inline filtering functions
julianknutsen e767340
[REFACTOR] Remove duplication in filtering functions
julianknutsen 00128d9
[BUGFIX] Fix off-by-one in truncation logic
julianknutsen c7bce9e
[TESTS] Add test of RequestDataHandler::onMessage
julianknutsen 873271c
[REFACTOR] Introduce processGetDataResponse
julianknutsen 690b980
[TESTS] Make verify() functions more flexible
julianknutsen a34488b
[TESTS] Add unit tests for processGetDataResponse
julianknutsen 3d6e9fb
Remove static from initialRequestApplied
julianknutsen f92893b
[TESTS] Write synchronization integration tests
julianknutsen 5db1285
[REFACTOR] Clean up processGetDataResponse
julianknutsen ecae31e
[RENAME] LazyProcessedPayload to ProcessOncePersistableNetworkPayload
julianknutsen a0fae12
Remove @Nullable around persistableNetworkPayloadSet
julianknutsen c503bcb
Remove @Nullable around supportedCapabilities in GetDataResponse
julianknutsen b1a06fe
Remove @Nullable around supportedCapabilities in PreliminaryGetDataRe…
julianknutsen 4fe19ae
[DEADCODE] Remove old request handler tests
julianknutsen 0649323
Make addPersistableNetworkPayloadFromInitialRequest private
julianknutsen 56a7661
[REFACTOR] Clean up ClientAPI for addPersistableNetworkPayload
julianknutsen 0e6b1a2
[REFACTOR] Clean up ClientAPI for addProtectedStorageEntry
julianknutsen 77413c9
[REFACTOR] Clean up ClientAPI for remove
julianknutsen 9f69134
[REFACTOR] Clean up ClientAPI for refreshTTL
julianknutsen bfdb8f5
Make isDataOwner a private policy decision in BroadcastHandler
julianknutsen 4dc4532
Remove isDataOwner from P2PDataStorage
julianknutsen 6ff8756
[REFACTOR] inline broadcast() private function
julianknutsen 5a174d5
[REFACTOR] inline broadcastProtectedStorageEntry() private function
julianknutsen 1bd450b
[REFACTOR] inline maybeAddToRemoveAddOncePayloads() private function
julianknutsen 17f4b70
[TESTS] Clean up mockito never() and eq(null) usages
julianknutsen b6b0026
Remove ProtectedStorageEntry::updateSignature
julianknutsen 24ecfc7
Remove ProtectedStorageEntry::maybeAdjustCreationTimeStamp
julianknutsen 0c67608
@NotNull ProtectedStorageEntry::ownerPubKey
julianknutsen 76e8c57
@NotNull ProtectedStorageEntry::protectedStoragePayload
julianknutsen 104984c
@NotNull MailboxStoragePayload::senderPubKeyForAddOperation
julianknutsen 01a7f79
Make CHECK_TTL_INTERVAL_SEC final
julianknutsen c38ff9b
s/networkPayload/protectedStoragePayload
julianknutsen 688405b
[TESTS] Make onDisconnect tests more robust
julianknutsen df2e4cc
Refactor P2PDataStorage::onDisconnect
julianknutsen b166009
Remove expire optimization in onDisconnect
julianknutsen 7b8d346
Remove filter for ExpirablePayload
julianknutsen e8c8225
[PR COMMENTS] Fix comment typo
julianknutsen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you prefer using directly
getPeersNodeAddressOptional().isPresent()
in comparison usinghasPeerNodeAddress()
? It is used mixed in the original code as well, so we might use one way for the future.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish there was a better reason than this one, but I used this pattern because it reduces the number of lint errors from IDEA. If you don't have an
isPresent()
call prior to aget()
it will highlight the word and raise an alert. You can suppress it, but that is just more code to add.The other benefit is that mocking is bit less error-prone because you just need to mock out the Optional and not the wrapper class that has the
hasPeerNodeAddress()
function.