Merge pull request #2684 from ngotchac/ngotchac/requeue-fixes
This commit is contained in:
commit
774d1b7ddb
@ -868,9 +868,9 @@ func (f *BlockFetcher) importHeaders(op *blockOrHeaderInject) {
|
||||
parent := f.getHeader(header.ParentHash)
|
||||
if parent == nil {
|
||||
log.Debug("Unknown parent of propagated header", "peer", peer, "number", header.Number, "hash", hash, "parent", header.ParentHash)
|
||||
time.Sleep(reQueueBlockTimeout)
|
||||
// forget block first, then re-queue
|
||||
f.done <- hash
|
||||
time.Sleep(reQueueBlockTimeout)
|
||||
f.requeue <- op
|
||||
return
|
||||
}
|
||||
@ -909,9 +909,9 @@ func (f *BlockFetcher) importBlocks(op *blockOrHeaderInject) {
|
||||
parent := f.getBlock(block.ParentHash())
|
||||
if parent == nil {
|
||||
log.Debug("Unknown parent of propagated block", "peer", peer, "number", block.Number(), "hash", hash, "parent", block.ParentHash())
|
||||
time.Sleep(reQueueBlockTimeout)
|
||||
// forget block first, then re-queue
|
||||
f.done <- hash
|
||||
time.Sleep(reQueueBlockTimeout)
|
||||
f.requeue <- op
|
||||
return
|
||||
}
|
||||
|
@ -248,6 +248,9 @@ func (h *handler) doSync(op *chainSyncOp) error {
|
||||
// degenerate connectivity, but it should be healthy for the mainnet too to
|
||||
// more reliably update peers or the local TD state.
|
||||
if block := h.chain.GetBlock(head.Hash(), head.Number.Uint64()); block != nil {
|
||||
if h.chain.Config().IsCancun(block.Number(), block.Time()) {
|
||||
block = block.WithSidecars(h.chain.GetSidecarsByHash(block.Hash()))
|
||||
}
|
||||
h.BroadcastBlock(block, false)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user