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:
CalDescent 2022-05-01 11:13:44 +01:00
parent ed04375385
commit 0c16d1fc11

View File

@ -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;
}