From fecfac5ad94b38c99dde3413750ed0c69ec45bff Mon Sep 17 00:00:00 2001 From: CalDescent Date: Thu, 16 Jun 2022 18:38:27 +0100 Subject: [PATCH] Keep existing findCommonBlocksWithPeers() and comparePeers() behaviour prior to consensus switchover, to reduce the number of variables. --- src/main/java/org/qortal/controller/Synchronizer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/qortal/controller/Synchronizer.java b/src/main/java/org/qortal/controller/Synchronizer.java index 61b5a331..61903bc7 100644 --- a/src/main/java/org/qortal/controller/Synchronizer.java +++ b/src/main/java/org/qortal/controller/Synchronizer.java @@ -241,12 +241,12 @@ public class Synchronizer extends Thread { final int peersBeforeComparison = peers.size(); - if (isNewConsensusActive) { + if (!isNewConsensusActive) { // Request recent block summaries from the remaining peers, and locate our common block with each - // Synchronizer.getInstance().findCommonBlocksWithPeers(peers); + Synchronizer.getInstance().findCommonBlocksWithPeers(peers); // Compare the peers against each other, and against our chain, which will return an updated list excluding those without common blocks - // peers = Synchronizer.getInstance().comparePeers(peers); + peers = Synchronizer.getInstance().comparePeers(peers); } // We may have added more inferior chain tips when comparing peers, so remove any peers that are currently on those chains