diff --git a/core/slice.go b/core/slice.go index ddae7b37ab..9f5b0343a6 100644 --- a/core/slice.go +++ b/core/slice.go @@ -153,8 +153,6 @@ func NewSlice(db ethdb.Database, config *Config, txConfig *TxPoolConfig, txLooku sl.WriteGenesisBlock(genesisBlock, chainConfig.Location) } - sl.CheckForBadHashAndRecover() - if nodeCtx == common.ZONE_CTX && sl.ProcessingState() { go sl.asyncPendingHeaderLoop() go sl.asyncWorkShareUpdateLoop() diff --git a/quai/handler.go b/quai/handler.go index 5597387957..686c7db0b0 100644 --- a/quai/handler.go +++ b/quai/handler.go @@ -106,6 +106,12 @@ func (h *handler) missingBlockLoop() { select { case blockRequest := <-h.missingBlockCh: + // If the blockRequest Hash is a bad block hash, node should not ask + // any peer for the hash + if h.core.IsBlockHashABadHash(blockRequest.Hash) { + continue + } + _, exists := h.recentBlockReqCache.Get(blockRequest.Hash) if !exists { // Add the block request to the cache to avoid requesting the same block multiple times