forked from Qortal/qortal
Preliminary version for fast sync set to 1.6.0, because 1.5.x is already released.
This commit is contained in:
parent
3b3dc5032b
commit
6c5dbf7bd0
@ -61,7 +61,7 @@ public class Synchronizer {
|
|||||||
private static final int MAXIMUM_REQUEST_SIZE = 200; // XXX move to Settings?
|
private static final int MAXIMUM_REQUEST_SIZE = 200; // XXX move to Settings?
|
||||||
|
|
||||||
/* 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_150 = 0x0100050000L;
|
private static final long PEER_VERSION_160 = 0x0100060000L;
|
||||||
|
|
||||||
|
|
||||||
private static Synchronizer instance;
|
private static Synchronizer instance;
|
||||||
@ -967,7 +967,7 @@ public class Synchronizer {
|
|||||||
private SynchronizationResult applyNewBlocks(Repository repository, BlockData commonBlockData, int ourInitialHeight,
|
private SynchronizationResult applyNewBlocks(Repository repository, BlockData commonBlockData, int ourInitialHeight,
|
||||||
Peer peer, int peerHeight, List<BlockSummaryData> peerBlockSummaries) throws InterruptedException, DataException {
|
Peer peer, int peerHeight, List<BlockSummaryData> peerBlockSummaries) throws InterruptedException, DataException {
|
||||||
|
|
||||||
if (Settings.getInstance().isFastSyncEnabled() && peer.getPeersVersion() >= PEER_VERSION_150)
|
if (Settings.getInstance().isFastSyncEnabled() && peer.getPeersVersion() >= PEER_VERSION_160)
|
||||||
// This peer supports syncing multiple blocks at once via GetBlocksMessage, and it is enabled in the settings
|
// This peer supports syncing multiple blocks at once via GetBlocksMessage, and it is enabled in the settings
|
||||||
return this.applyNewBlocksUsingFastSync(repository, commonBlockData, ourInitialHeight, peer, peerHeight, peerBlockSummaries);
|
return this.applyNewBlocksUsingFastSync(repository, commonBlockData, ourInitialHeight, peer, peerHeight, peerBlockSummaries);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user