diff --git a/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java b/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java index 6b7bf80157..2c7fdd6caf 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java @@ -774,7 +774,9 @@ public final class PeerManager implements ConnectionListener, PersistedDataHost // If not found in connection we look up if we got the Capabilities set from any of the // reported or persisted peers Set persistedAndReported = new HashSet<>(getPersistedPeers()); - persistedAndReported.addAll(getReportedPeers()); + synchronized (reportedPeers) { + persistedAndReported.addAll(reportedPeers); + } Optional candidate = persistedAndReported.stream() .filter(peer -> peer.getNodeAddress().equals(peersNodeAddress)) .filter(peer -> !peer.getCapabilities().isEmpty())