forked from Qortal/qortal
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.
This commit is contained in:
parent
ed04375385
commit
0c16d1fc11
@ -209,6 +209,8 @@ public class Settings {
|
|||||||
private int minPeerConnectionTime = 5 * 60; // seconds
|
private int minPeerConnectionTime = 5 * 60; // seconds
|
||||||
/** Maximum time (in seconds) that we should attempt to remain connected to a peer for */
|
/** Maximum time (in seconds) that we should attempt to remain connected to a peer for */
|
||||||
private int maxPeerConnectionTime = 60 * 60; // seconds
|
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 */
|
/** Whether to sync multiple blocks at once in normal operation */
|
||||||
private boolean fastSyncEnabled = true;
|
private boolean fastSyncEnabled = true;
|
||||||
@ -670,6 +672,10 @@ public class Settings {
|
|||||||
|
|
||||||
public int getMaxPeerConnectionTime() { return this.maxPeerConnectionTime; }
|
public int getMaxPeerConnectionTime() { return this.maxPeerConnectionTime; }
|
||||||
|
|
||||||
|
public int getMaxDataPeerConnectionTime() {
|
||||||
|
return this.maxDataPeerConnectionTime;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBlockchainConfig() {
|
public String getBlockchainConfig() {
|
||||||
return this.blockchainConfig;
|
return this.blockchainConfig;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user