[bisq-network/bisq] Persist and republish mailbox messages (#5072)
sqrrm
notifications at github.com
Thu Jan 14 17:22:39 CET 2021
@sqrrm commented on this pull request.
Seems mostly good. I wonder about the size check to push out old messages though.
> @@ -271,18 +271,19 @@ public void removeMailboxMsg(MailboxMessage mailboxMessage) {
// mailboxMessageList while getting called.
UserThread.execute(() -> {
String uid = mailboxMessage.getUid();
-
- // We called removeMailboxEntryFromNetwork at processMyMailboxItem,
- // but in case we have not been bootstrapped at that moment it did not get removed from the network.
- // So to be sure it gets removed we try to remove it now again.
- // In case it was removed earlier it will return early anyway inside the p2pDataStorage.
- removeMailboxEntryFromNetwork(mailboxItemsByUid.get(uid).getProtectedMailboxStorageEntry());
-
- // We will get called the onRemoved handler which triggers removeMailboxItemFromMap as well.
- // But as we use the uid from the decrypted data which is not available at onRemoved we need to
- // call removeMailboxItemFromMap here. The onRemoved only removes foreign mailBoxMessages.
- log.trace("## removeMailboxMsg uid={}", uid);
- removeMailboxItemFromLocalStore(uid);
+ if (mailboxItemsByUid.containsKey(uid)) {
Prefer early return
--
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/5072#pullrequestreview-568389215
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210114/ccd6545b/attachment.htm>
More information about the bisq-github
mailing list