Skip to content

Commit

Permalink
Disabled parallel execution for now on Polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Jun 14, 2023
1 parent 58d0ddf commit b0d1314
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,11 @@ func NewParallelBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainCon
return nil, err
}

bc.parallelProcessor = NewParallelStateProcessor(chainConfig, bc, engine)
if firehose.Enabled {
log.Warn("Firehose switched parallel execution to be performed serially because Firehose don't support it today, support incoming")
} else {
bc.parallelProcessor = NewParallelStateProcessor(chainConfig, bc, engine)
}

return bc, nil
}
Expand All @@ -531,8 +535,6 @@ func (bc *BlockChain) ProcessBlock(block *types.Block, parent *types.Header) (ty
processorCount := 0

if bc.parallelProcessor != nil {
fmt.Fprintln(os.Stderr, "FIREHOSE parallel processor is used")

parallelStatedb, err := state.New(parent.Root, bc.stateCache, bc.snaps)
if err != nil {
return nil, nil, 0, nil, err
Expand All @@ -548,8 +550,6 @@ func (bc *BlockChain) ProcessBlock(block *types.Block, parent *types.Header) (ty
}

if bc.processor != nil {
fmt.Fprintln(os.Stderr, "FIREHOSE serial processor is used")

statedb, err := state.New(parent.Root, bc.stateCache, bc.snaps)
if err != nil {
return nil, nil, 0, nil, err
Expand Down

0 comments on commit b0d1314

Please sign in to comment.