Skip to content

Commit

Permalink
update flushing comment
Browse files Browse the repository at this point in the history
  • Loading branch information
magicxyyz committed Sep 26, 2023
1 parent 0b3e0d0 commit 89f53b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,10 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
if err != nil {
return err
}
// If we're running an archive node, always flush
// If we're running an archive node, flush
// If MaxNumberOfBlocksToSkipStateSaving or MaxAmountOfGasToSkipStateSaving is not zero, then flushing of some blocks will be skipped:
// * at most MaxNumberOfBlocksToSkipStateSaving block state commits will be skipped
// * sum of gas used in skipped blocks will be at most MaxAmountOfGasToSkipStateSaving
if bc.cacheConfig.TrieDirtyDisabled {
var maySkipCommiting, blockLimitReached, gasLimitReached bool
if bc.cacheConfig.MaxNumberOfBlocksToSkipStateSaving != 0 {
Expand Down

0 comments on commit 89f53b0

Please sign in to comment.