Browse Source

Increased MAX_DATA_SIZE and SYNC_BATCH_SIZE, to increase the effectiveness of the batch sync.

sync-multiple-blocks
CalDescent 3 years ago
parent
commit
ed423ed041
  1. 2
      src/main/java/org/qortal/controller/Synchronizer.java
  2. 2
      src/main/java/org/qortal/network/message/Message.java

2
src/main/java/org/qortal/controller/Synchronizer.java

@ -49,7 +49,7 @@ public class Synchronizer {
private static final Logger LOGGER = LogManager.getLogger(Synchronizer.class); private static final Logger LOGGER = LogManager.getLogger(Synchronizer.class);
/** Max number of new blocks we aim to add to chain tip in each sync round */ /** Max number of new blocks we aim to add to chain tip in each sync round */
private static final int SYNC_BATCH_SIZE = 200; // XXX move to Settings? private static final int SYNC_BATCH_SIZE = 1000; // XXX move to Settings?
/** Initial jump back of block height when searching for common block with peer */ /** Initial jump back of block height when searching for common block with peer */
private static final int INITIAL_BLOCK_STEP = 8; private static final int INITIAL_BLOCK_STEP = 8;

2
src/main/java/org/qortal/network/message/Message.java

@ -25,7 +25,7 @@ public abstract class Message {
private static final int MAGIC_LENGTH = 4; private static final int MAGIC_LENGTH = 4;
private static final int CHECKSUM_LENGTH = 4; private static final int CHECKSUM_LENGTH = 4;
private static final int MAX_DATA_SIZE = 1024 * 1024; // 1MB private static final int MAX_DATA_SIZE = 10 * 1024 * 1024; // 10MB
@SuppressWarnings("serial") @SuppressWarnings("serial")
public static class MessageException extends Exception { public static class MessageException extends Exception {

Loading…
Cancel
Save