Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forking code #42

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions core/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 6 additions & 0 deletions quai/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading