forked from Qortal/qortal
Relocate FETCH_BLOCKS_TIMEOUT to Peer.java and use a static import.
This commit is contained in:
parent
8881e0fb75
commit
688404011b
@ -42,6 +42,8 @@ import org.qortal.transaction.Transaction;
|
|||||||
import org.qortal.utils.Base58;
|
import org.qortal.utils.Base58;
|
||||||
import org.qortal.utils.NTP;
|
import org.qortal.utils.NTP;
|
||||||
|
|
||||||
|
import static org.qortal.network.Peer.FETCH_BLOCKS_TIMEOUT;
|
||||||
|
|
||||||
public class Synchronizer {
|
public class Synchronizer {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(Synchronizer.class);
|
private static final Logger LOGGER = LogManager.getLogger(Synchronizer.class);
|
||||||
@ -63,8 +65,7 @@ public class Synchronizer {
|
|||||||
/* Minimum peer version that supports syncing multiple blocks at once via GetBlocksMessage */
|
/* Minimum peer version that supports syncing multiple blocks at once via GetBlocksMessage */
|
||||||
private static final long PEER_VERSION_160 = 0x0100060000L;
|
private static final long PEER_VERSION_160 = 0x0100060000L;
|
||||||
|
|
||||||
/** Maximum time to wait for a peer to respond with blocks (ms) */
|
|
||||||
private static final int FETCH_BLOCKS_TIMEOUT = 10000;
|
|
||||||
|
|
||||||
|
|
||||||
private static Synchronizer instance;
|
private static Synchronizer instance;
|
||||||
|
@ -47,6 +47,11 @@ public class Peer {
|
|||||||
*/
|
*/
|
||||||
private static final int RESPONSE_TIMEOUT = 3000; // ms
|
private static final int RESPONSE_TIMEOUT = 3000; // ms
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum time to wait for a peer to respond with blocks (ms)
|
||||||
|
*/
|
||||||
|
public static final int FETCH_BLOCKS_TIMEOUT = 10000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interval between PING messages to a peer. (ms)
|
* Interval between PING messages to a peer. (ms)
|
||||||
* <p>
|
* <p>
|
||||||
|
Loading…
Reference in New Issue
Block a user