forked from Qortal/qortal
Removed missed functional change
This commit is contained in:
parent
265d40f04a
commit
de4b1c8f09
@ -35,8 +35,6 @@ import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.qortal.controller.Controller.MISBEHAVIOUR_COOLOFF;
|
||||
|
||||
// For managing peers
|
||||
public class Network {
|
||||
private static final Logger LOGGER = LogManager.getLogger(Network.class);
|
||||
@ -267,11 +265,6 @@ public class Network {
|
||||
return this.connectedPeers.stream().anyMatch(peer -> peer.getPeerData().getAddress().equals(peerAddress));
|
||||
};
|
||||
|
||||
private static final Predicate<PeerData> hasMisbehaved = peerData -> {
|
||||
final Long lastMisbehaved = peerData.getLastMisbehaved();
|
||||
return lastMisbehaved != null && lastMisbehaved > NTP.getTime() - MISBEHAVIOUR_COOLOFF;
|
||||
};
|
||||
|
||||
/**
|
||||
* Must be inside <tt>synchronized (this.connectedPeers) {...}</tt>
|
||||
*/
|
||||
@ -571,8 +564,6 @@ public class Network {
|
||||
|| peerData.getLastConnected() < peerData.getLastAttempted())
|
||||
&& peerData.getLastAttempted() > lastAttemptedThreshold);
|
||||
|
||||
peers.removeIf(hasMisbehaved);
|
||||
|
||||
// Don't consider peers that we know loop back to ourself
|
||||
synchronized (this.selfPeers) {
|
||||
peers.removeIf(isSelfPeer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user