Skip to content

Commit

Permalink
FLushTrieDB does nothing for path scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoximenes committed Jan 22, 2025
1 parent 647846d commit 300664a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/blockchain_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ import (
)

func (bc *BlockChain) FlushTrieDB(advanceBlockChainMutex *sync.Mutex, capLimit common.StorageSize) error {
if bc.triedb.Scheme() == rawdb.PathScheme {
return nil
}

advanceBlockChainMutex.Lock()
defer advanceBlockChainMutex.Unlock()

Expand All @@ -39,11 +43,9 @@ func (bc *BlockChain) FlushTrieDB(advanceBlockChainMutex *sync.Mutex, capLimit c
return err
}

if bc.triedb.Scheme() == rawdb.HashScheme {
err = bc.triedb.Cap(capLimit)
if err != nil {
return err
}
err = bc.triedb.Cap(capLimit)
if err != nil {
return err
}

bc.gcproc = 0
Expand Down

0 comments on commit 300664a

Please sign in to comment.