From fbcc07e2c829060006711363c86d8df1558d9546 Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Wed, 22 May 2024 10:21:31 +0530 Subject: [PATCH] not going into snap sync --- eth/handler.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/eth/handler.go b/eth/handler.go index bbc3cf18a4..a72bc391f3 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -172,17 +172,19 @@ func newHandler(config *handlerConfig) (*handler, error) { // * the last snap sync is not finished while user specifies a full sync this // time. But we don't have any recent state for full sync. // In these cases however it's safe to reenable snap sync. - fullBlock, snapBlock := h.chain.CurrentBlock(), h.chain.CurrentSnapBlock() - if fullBlock.Number.Uint64() == 0 && snapBlock.Number.Uint64() > 0 { - h.snapSync.Store(true) - log.Warn("Switch sync mode from full sync to snap sync", "reason", "snap sync incomplete") - } else if !h.chain.HasState(fullBlock.Root) { - // TODO - uncomment when we (Polygon-PoS, bor) have snap sync/pbss - // For more info - https://github.com/ethereum/go-ethereum/pull/28171 - // h.snapSync.Store(true) - log.Warn("Switch sync mode from full sync to snap sync", "reason", "head state missing") - } + // TODO - uncomment when we (Polygon-PoS, bor) have snap sync/pbss + // fullBlock, snapBlock := h.chain.CurrentBlock(), h.chain.CurrentSnapBlock() + + // TODO - uncomment when we (Polygon-PoS, bor) have snap sync/pbss + // For more info - https://github.com/ethereum/go-ethereum/pull/28171 + // if fullBlock.Number.Uint64() == 0 && snapBlock.Number.Uint64() > 0 { + // h.snapSync.Store(true) + // log.Warn("Switch sync mode from full sync to snap sync", "reason", "snap sync incomplete") + // } else if !h.chain.HasState(fullBlock.Root) { + // h.snapSync.Store(true) + // log.Warn("Switch sync mode from full sync to snap sync", "reason", "head state missing") + // } } else { head := h.chain.CurrentBlock() if head.Number.Uint64() > 0 && h.chain.HasState(head.Root) {