mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Improve logs
- Remove logging of 'SupportedCapabilities is empty...' in Peer - Add log of number of peesWithNoCapabilitiesSet at persistedPeerList
This commit is contained in:
parent
281e156449
commit
3d8d8cc760
2 changed files with 13 additions and 5 deletions
|
@ -178,9 +178,20 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
|||
@Override
|
||||
public void readPersisted() {
|
||||
PeerList persistedPeerList = storage.initAndGetPersistedWithFileName("PeerList", 1000);
|
||||
if (persistedPeerList != null)
|
||||
if (persistedPeerList != null) {
|
||||
long peesWithNoCapabilitiesSet = persistedPeerList.getList().stream()
|
||||
.filter(e -> e.getSupportedCapabilities().isEmpty())
|
||||
.mapToInt(e -> 1)
|
||||
.count();
|
||||
if (peesWithNoCapabilitiesSet > 100) {
|
||||
log.warn("peesWithNoCapabilitiesSet={}, persistedPeerList.size()={}", peesWithNoCapabilitiesSet, persistedPeerList.size());
|
||||
} else {
|
||||
log.info("peesWithNoCapabilitiesSet={}, persistedPeerList.size()={}", peesWithNoCapabilitiesSet, persistedPeerList.size());
|
||||
}
|
||||
|
||||
this.persistedPeers.addAll(persistedPeerList.getList());
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxConnections() {
|
||||
return maxConnectionsAbsolute;
|
||||
|
@ -648,7 +659,7 @@ public class PeerManager implements ConnectionListener, PersistedDataHost {
|
|||
.filter(peer -> peer.getDate().getTime() > maxAge)
|
||||
.collect(Collectors.toSet());
|
||||
if (oldNumLatestLivePeers != latestLivePeers.size())
|
||||
log.info("Num of latestLivePeers={}, latestLivePeers={}", latestLivePeers.size(), latestLivePeers);
|
||||
log.info("Num of latestLivePeers={}", latestLivePeers.size());
|
||||
return latestLivePeers;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,9 +64,6 @@ public final class Peer implements NetworkPayload, PersistablePayload, Supported
|
|||
this.nodeAddress = nodeAddress;
|
||||
this.date = date;
|
||||
this.supportedCapabilities = supportedCapabilities;
|
||||
|
||||
if (supportedCapabilities.isEmpty())
|
||||
log.warn("SupportedCapabilities is empty. nodeAddress={}", nodeAddress);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue