[bisq-network/bisq] [WIP] Remove address prefix for mailbox messages (#4609)
chimp1984
notifications at github.com
Wed Oct 7 23:07:43 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);
Yes good catch. Should be
` ``
private void processSingleMailboxEntry(Collection<ProtectedMailboxStorageEntry> protectedMailboxStorageEntries) {
checkArgument(protectedMailboxStorageEntries.size() == 1);
var decryptedEntries = new ArrayList<>(getDecryptedEntries(protectedMailboxStorageEntries));
storeMailboxDataAndNotifyListeners(decryptedEntries.get(0));
}
```
--
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_r501359738
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201007/c958cb55/attachment.html>
More information about the bisq-github
mailing list