[bisq-network/bisq] [WIP] Remove address prefix for mailbox messages (#4609)

chimp1984 notifications at github.com
Wed Oct 7 23:08:45 UTC 2020


@chimp1984 commented on this pull request.



> +        Collection<ProtectedMailboxStorageEntry> entries = protectedStorageEntries.stream()
+                .filter(e -> e instanceof ProtectedMailboxStorageEntry)
+                .map(e -> (ProtectedMailboxStorageEntry) e)
+                .filter(e -> networkNode.getNodeAddress() != null)
+                .filter(e -> !seedNodeRepository.isSeedNode(networkNode.getNodeAddress())) // Seed nodes don't expect mailbox messages
+                .collect(Collectors.toSet());
+        if (entries.size() > 1) {
+            threadedBatchProcessMailboxEntries(entries);
+        } else if (entries.size() == 1) {
+            processSingleMailboxEntry(entries);
+        }
+    }
+
+    private void processSingleMailboxEntry(Collection<ProtectedMailboxStorageEntry> protectedMailboxStorageEntries) {
+        var decryptedEntries = new ArrayList<>(getDecryptedEntries(protectedMailboxStorageEntries));
+        checkArgument(decryptedEntries.size() == 1);

We get called only in case of 1 entry, also the name reflects that.

-- 
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/4609#discussion_r501360094
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201007/6835549c/attachment.html>


More information about the bisq-github mailing list