From 04e918eeddf626e01048209459220296233418bd Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Sun, 1 Nov 2020 09:44:38 -0800 Subject: [PATCH] fix sync threshold, have to be 0 --- api/service/syncing/syncing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/service/syncing/syncing.go b/api/service/syncing/syncing.go index 03a3b46ca..873da9e90 100644 --- a/api/service/syncing/syncing.go +++ b/api/service/syncing/syncing.go @@ -32,7 +32,7 @@ const ( TimesToFail = 5 // downloadBlocks service retry limit RegistrationNumber = 3 SyncingPortDifference = 3000 - inSyncThreshold = 1 // when peerBlockHeight - myBlockHeight <= inSyncThreshold, it's ready to join consensus + inSyncThreshold = 0 // when peerBlockHeight - myBlockHeight <= inSyncThreshold, it's ready to join consensus SyncLoopBatchSize uint32 = 1000 // maximum size for one query of block hashes verifyHeaderBatchSize uint64 = 100 // block chain header verification batch size SyncLoopFrequency = 1 // unit in second