From 37bf0e7f73219a41af852c806cf70c246c0314f8 Mon Sep 17 00:00:00 2001 From: Jacky Wang Date: Tue, 8 Dec 2020 16:38:00 -0800 Subject: [PATCH] [sync] fix explorer sync --- api/service/syncing/syncing.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/service/syncing/syncing.go b/api/service/syncing/syncing.go index 09f5b4b83..d04c7d8e5 100644 --- a/api/service/syncing/syncing.go +++ b/api/service/syncing/syncing.go @@ -1025,6 +1025,11 @@ func (ss *StateSync) SyncLoop(bc *core.BlockChain, worker *worker.Worker, isBeac if err := ss.addConsensusLastMile(bc, consensus); err != nil { utils.Logger().Error().Err(err).Msg("[SYNC] Add consensus last mile") } + if bc.CurrentBlock().IsLastBlockInEpoch() { + // Temporary fix for explorer node. This logic is only needed for explorer node. + // TODO: refactor this. + consensus.UpdateConsensusInformation() + } } ss.purgeAllBlocksFromCache() }