From 365662a2afd4c913cd8a0f180bb65cd18b9f9a6c Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sat, 27 Mar 2021 19:25:27 +0000 Subject: [PATCH] MAXIMUM_RETRIES reduced from 3 to 1. It will now only retry once, which should save around 6 seconds of wasted synchronization time if a node is unable to respond with the requested block (due to a re-org, etc). --- src/main/java/org/qortal/controller/Synchronizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/qortal/controller/Synchronizer.java b/src/main/java/org/qortal/controller/Synchronizer.java index 2aa2fb8a..c747dd6e 100644 --- a/src/main/java/org/qortal/controller/Synchronizer.java +++ b/src/main/java/org/qortal/controller/Synchronizer.java @@ -57,7 +57,7 @@ public class Synchronizer { private static final int MAXIMUM_REQUEST_SIZE = 200; // XXX move to Settings? /** Number of retry attempts if a peer fails to respond with the requested data */ - private static final int MAXIMUM_RETRIES = 3; // XXX move to Settings? + private static final int MAXIMUM_RETRIES = 1; // XXX move to Settings? /* Minimum peer version that supports syncing multiple blocks at once via GetBlocksMessage */ private static final long PEER_VERSION_150 = 0x0100050000L;