forked from cerc-io/plugeth
Merge pull request #25428 from karalabe/engineapi-snap-import-deny
eth/catalyst: fix NewPayload warn log when dropping due to snap sync
This commit is contained in:
commit
c02b0488fb
@ -417,7 +417,17 @@ func (api *ConsensusAPI) delayPayloadImport(block *types.Block) (beacon.PayloadS
|
|||||||
// payload as non-integratable on top of the existing sync. We'll just
|
// payload as non-integratable on top of the existing sync. We'll just
|
||||||
// have to rely on the beacon client to forcefully update the head with
|
// have to rely on the beacon client to forcefully update the head with
|
||||||
// a forkchoice update request.
|
// a forkchoice update request.
|
||||||
log.Warn("Ignoring payload with missing parent", "number", block.NumberU64(), "hash", block.Hash(), "parent", block.ParentHash())
|
if api.eth.SyncMode() == downloader.FullSync {
|
||||||
|
// In full sync mode, failure to import a well-formed block can only mean
|
||||||
|
// that the parent state is missing and the syncer rejected extending the
|
||||||
|
// current cycle with the new payload.
|
||||||
|
log.Warn("Ignoring payload with missing parent", "number", block.NumberU64(), "hash", block.Hash(), "parent", block.ParentHash())
|
||||||
|
} else {
|
||||||
|
// In non-full sync mode (i.e. snap sync) all payloads are rejected until
|
||||||
|
// snap sync terminates as snap sync relies on direct database injections
|
||||||
|
// and cannot afford concurrent out-if-band modifications via imports.
|
||||||
|
log.Warn("Ignoring payload while snap syncing", "number", block.NumberU64(), "hash", block.Hash())
|
||||||
|
}
|
||||||
return beacon.PayloadStatusV1{Status: beacon.ACCEPTED}, nil
|
return beacon.PayloadStatusV1{Status: beacon.ACCEPTED}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user