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

Persist and republish mailbox messages #5072

Merged
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
0656a52
Refactor: Move mailbox related classed to mailbox package. Make const…
chimp1984 Jan 10, 2021
73cfe0b
Make some methods default
chimp1984 Jan 10, 2021
a28a2f5
Move mailbox related code from P2PService to MailboxMessageService
chimp1984 Jan 10, 2021
d470d73
Remove getMailBoxMessages from P2PService and use MailboxMessageServi…
chimp1984 Jan 10, 2021
ee3f158
Remove addDecryptedMailboxListener from P2PService and use MailboxMes…
chimp1984 Jan 10, 2021
33703c2
Remove removePrivateNotification from P2PService and use MailboxMessa…
chimp1984 Jan 10, 2021
b8fc7f3
Remove sendEncryptedMailboxMessage from P2PService and use MailboxMes…
chimp1984 Jan 10, 2021
4fc35a7
Cleanups
chimp1984 Jan 10, 2021
4c7b560
Add new methods, make decryptedMessageWithPubKey nullable
chimp1984 Jan 10, 2021
504fb2e
Refactor: Rename
chimp1984 Jan 10, 2021
cf8c93d
Filter expired entries at startup
chimp1984 Jan 10, 2021
79363e7
Refactor: Rename
chimp1984 Jan 10, 2021
63a0117
Remove nullable return value from decryptProtectedMailboxStorageEntry
chimp1984 Jan 11, 2021
5245c20
Add filter for isMine at getMyMailBoxMessages
chimp1984 Jan 11, 2021
bfbc657
Remove old code
chimp1984 Jan 11, 2021
6146362
Add onRemoved method to remove mailbox entries once a remove message …
chimp1984 Jan 11, 2021
32f8874
Persist map for removed mailbox messages (AddOncePayload more generally)
chimp1984 Jan 11, 2021
75e547f
Refactor: move classes to persistence package
chimp1984 Jan 11, 2021
e69a3f6
Refactor: rename method
chimp1984 Jan 11, 2021
1886b4e
Set addressPrefixHash to empty bytes.
chimp1984 Jan 11, 2021
5ba7d78
Add RemovedPayloadsStorageService
chimp1984 Jan 11, 2021
41a92ea
Refactor: Rename class
chimp1984 Jan 11, 2021
9edad02
Use a hashset for listeners
chimp1984 Jan 11, 2021
de131c8
Use MailboxItem value at mailboxItemsByUid instead of a list:
chimp1984 Jan 11, 2021
a3b2aad
Refactor: move class to new utils package
chimp1984 Jan 11, 2021
026858d
Refactor: move duplicated method
chimp1984 Jan 11, 2021
873b557
Add logs
chimp1984 Jan 11, 2021
7a2501e
Set uid inside constructor
chimp1984 Jan 11, 2021
35ef3b8
Add support for TTL defined by payload message so we can use
chimp1984 Jan 11, 2021
659fe15
Add comment
chimp1984 Jan 11, 2021
320e5f1
Refactor: Rename method
chimp1984 Jan 11, 2021
a54813a
Increase timout for BroadcastHandler to 120 sec
chimp1984 Jan 12, 2021
8e0181e
Add republishExistingProtectedMailboxStorageEntry method
chimp1984 Jan 12, 2021
e933bfd
Add temp. ignore to a failing test.
chimp1984 Jan 12, 2021
8d866d5
Improve logs, rename methods, variables
chimp1984 Jan 12, 2021
a9802e6
Refactor: return early
chimp1984 Jan 12, 2021
d39a697
Fix wrong delay, increase timeout
chimp1984 Jan 12, 2021
b4ab8a4
Fix incorrect comparison at RemovedPayloadsService.readPersisted
chimp1984 Jan 12, 2021
337ea89
Add program argument flag republishMailboxEntries
chimp1984 Jan 12, 2021
32aeda7
Add null check
chimp1984 Jan 12, 2021
3875bd8
Add removeMailboxMsg with MailboxMessage as argument
chimp1984 Jan 12, 2021
0f08794
Remove unneeded wrapping of tradeMessage into DecryptedMessageWithPubKey
chimp1984 Jan 12, 2021
bffe2b8
Store PrivateNotificationMessage instead of DecryptedMessageWithPubKey
chimp1984 Jan 12, 2021
f536aba
Refactor handling of removeMailboxMsg
chimp1984 Jan 12, 2021
456ce70
Refactor: rename dispatchMessage to onSupportMessage (no functionalit…
chimp1984 Jan 12, 2021
2235c4f
Use removeMailboxMsg method with MailboxMessage as param type
chimp1984 Jan 12, 2021
575196c
Refactor handleDecryptedMessageWithPubKey to use MailboxMessage
chimp1984 Jan 12, 2021
5cdae86
Refactor: rename method to make it more explicit that its only used f…
chimp1984 Jan 12, 2021
d353140
Refactor: rename getMyDecryptedMessages method to make it more explicit
chimp1984 Jan 12, 2021
c229c3f
Refactor handling of DecryptedMessageWithPubKey
chimp1984 Jan 12, 2021
008fb3b
Inline isMyMessage methods
chimp1984 Jan 12, 2021
5c429bb
Add containsKey check
chimp1984 Jan 12, 2021
4c003cd
Clone reportedPeers to avoid ConcurrentModificationExceptions
chimp1984 Jan 12, 2021
46f6026
Remove outdated code
chimp1984 Jan 12, 2021
470230c
Add TradeMailboxMessage and use a TTL of 15 days
chimp1984 Jan 12, 2021
2b05ed5
Let MailboxMessage extend ExpirablePayload:
chimp1984 Jan 12, 2021
364a7f5
Add toString
chimp1984 Jan 12, 2021
a21d79a
Refactor: rename
chimp1984 Jan 12, 2021
3e69ede
Remove comment
chimp1984 Jan 12, 2021
3834785
Bugfix: Add processing of SendersNodeAddressMessage to
chimp1984 Jan 12, 2021
36657f5
Use TradeMailboxMessage as type for getMessage in SendMailboxMessageTask
chimp1984 Jan 12, 2021
c12e239
Refactor: rename method
chimp1984 Jan 12, 2021
2fb3bba
Use MailboxMessage as param type in sendEncryptedMailboxMessage
chimp1984 Jan 12, 2021
d434cb3
Sort persisted mail box messages by age and limit total number.
chimp1984 Jan 13, 2021
541f367
Dont log filter content if a filter got updated
chimp1984 Jan 14, 2021
7ba5ab5
Change prio for mailboxMessageList persitence
chimp1984 Jan 14, 2021
5d13fdc
Return early
chimp1984 Jan 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions core/src/main/java/bisq/core/filter/FilterManager.java
Expand Up @@ -490,19 +490,13 @@ private void onFilterAddedFromNetwork(Filter newFilter) {
if (currentFilter != null) {
if (currentFilter.getCreationDate() > newFilter.getCreationDate()) {
log.warn("We received a new filter from the network but the creation date is older than the " +
"filter we have already. We ignore the new filter.\n" +
"New filer={}\n" +
"Old filter={}",
newFilter, filterProperty.get());
"filter we have already. We ignore the new filter.");

addToInvalidFilters(newFilter);
return;
} else {
log.warn("We received a new filter from the network and the creation date is newer than the " +
"filter we have already. We ignore the old filter.\n" +
"New filer={}\n" +
"Old filter={}",
newFilter, filterProperty.get());
"filter we have already. We ignore the old filter.");
addToInvalidFilters(currentFilter);
}

Expand Down