mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-05 06:28:40 +00:00
eth/catalyst: import new payload if at genesis, regardless of sync status (#32673)
fixes #32672 This is kind of a band aid solution since it fixes the issue by bypassing the snap sync expectations of an empty db and attempting to import the new payload if we're at block 1. The next FCU will set the status to synced. Will continue looking to better understand how the above issue arises and find a more thorough solution. --------- Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
parent
c782197d48
commit
1a2333650a
1 changed files with 5 additions and 1 deletions
|
|
@ -911,7 +911,11 @@ func (api *ConsensusAPI) newPayload(ctx context.Context, params engine.Executabl
|
||||||
// into the database directly will conflict with the assumptions of snap sync
|
// into the database directly will conflict with the assumptions of snap sync
|
||||||
// that it has an empty db that it can fill itself.
|
// that it has an empty db that it can fill itself.
|
||||||
if api.eth.Downloader().ConfigSyncMode() == ethconfig.SnapSync {
|
if api.eth.Downloader().ConfigSyncMode() == ethconfig.SnapSync {
|
||||||
return api.delayPayloadImport(block), nil
|
// If the client is started at genesis of a test network with snap sync
|
||||||
|
// enabled, just try to import the block since there is nothing to sync.
|
||||||
|
if block.NumberU64() != 1 {
|
||||||
|
return api.delayPayloadImport(block), nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if !api.eth.BlockChain().HasBlockAndState(block.ParentHash(), block.NumberU64()-1) {
|
if !api.eth.BlockChain().HasBlockAndState(block.ParentHash(), block.NumberU64()-1) {
|
||||||
api.remoteBlocks.put(block.Hash(), block.Header())
|
api.remoteBlocks.put(block.Hash(), block.Header())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue