[bisq-network/bisq] Refactor capabilities (#2552)
Manfred Karrer
notifications at github.com
Mon Mar 18 16:26:55 UTC 2019
ManfredKarrer requested changes on this pull request.
> @@ -176,7 +176,7 @@ public void readPersisted() {
PeerList persistedPeerList = storage.initAndGetPersistedWithFileName("PeerList", 1000);
if (persistedPeerList != null) {
long peersWithNoCapabilitiesSet = persistedPeerList.getList().stream()
- .filter(e -> e.getCapabilities().hasCapabilities())
+ .filter(e -> e.getCapabilities().isEmpty())
I think here is the ! missing
> Set<Peer> allPeers = new HashSet<>(getPersistedPeers());
allPeers.addAll(getReportedPeers());
Optional<Peer> ourPeer = allPeers.stream().filter(peer -> peer.getNodeAddress().equals(connection.getPeersNodeAddressOptional().get()))
- .filter(peer -> !peer.getCapabilities().hasCapabilities())
+ .filter(peer -> !peer.getCapabilities().isEmpty())
Here is the boolean logic inverse to the older version.
--
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/2552#pullrequestreview-215708312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190318/26d48d1f/attachment.html>
More information about the bisq-github
mailing list