Browse Source

Added "maxDataPeerConnectionTime" setting (default 2 mins).

This is used to force a quick disconnect for peers that are only connecting for the purposes of requesting data for a specific arbitrary transaction signature.
qdn-direct-connections
CalDescent 2 years ago
parent
commit
0c16d1fc11
  1. 6
      src/main/java/org/qortal/settings/Settings.java

6
src/main/java/org/qortal/settings/Settings.java

@ -209,6 +209,8 @@ public class Settings {
private int minPeerConnectionTime = 5 * 60; // seconds
/** Maximum time (in seconds) that we should attempt to remain connected to a peer for */
private int maxPeerConnectionTime = 60 * 60; // seconds
/** Maximum time (in seconds) that a peer should remain connected when requesting QDN data */
private int maxDataPeerConnectionTime = 2 * 60; // seconds
/** Whether to sync multiple blocks at once in normal operation */
private boolean fastSyncEnabled = true;
@ -670,6 +672,10 @@ public class Settings {
public int getMaxPeerConnectionTime() { return this.maxPeerConnectionTime; }
public int getMaxDataPeerConnectionTime() {
return this.maxDataPeerConnectionTime;
}
public String getBlockchainConfig() {
return this.blockchainConfig;
}

Loading…
Cancel
Save