Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
remove unused cache
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Nov 1, 2023
1 parent cb37dfa commit 4a1b524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eth/core/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ func (bc *blockchain) InsertBlockAndSetHead(block *types.Block) error {
// Process the incoming EVM block.
receipts, logs, usedGas, err := bc.processor.Process(block, bc.statedb, *bc.vmConfig)
if err != nil {
log.Error("failed to process block", "num", block.NumberU64())
log.Error("failed to process block", "num", block.NumberU64(), "err", err)
return err
}

// ValidateState validates the statedb post block processing.
if err = bc.validator.ValidateState(block, bc.statedb, receipts, usedGas); err != nil {
log.Error("invalid state after processing block", "num", block.NumberU64())
log.Error("invalid state after processing block", "num", block.NumberU64(), "err", err)
return err
}

// We can just immediately finalize the block. It's okay in this context.
if _, err = bc.WriteBlockAndSetHead(
block, receipts, logs, nil, true); err != nil {
log.Error("failed to write block", "num", block.NumberU64())
log.Error("failed to write block", "num", block.NumberU64(), "err", err)
return err
}

Expand Down

0 comments on commit 4a1b524

Please sign in to comment.