From 300664abf8aa4db92958948f1c2ba2fb279c9dfe Mon Sep 17 00:00:00 2001 From: Diego Ximenes Date: Wed, 22 Jan 2025 10:32:47 -0300 Subject: [PATCH] FLushTrieDB does nothing for path scheme --- core/blockchain_arbitrum.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/blockchain_arbitrum.go b/core/blockchain_arbitrum.go index 98e04aeb3..f1052f65f 100644 --- a/core/blockchain_arbitrum.go +++ b/core/blockchain_arbitrum.go @@ -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() @@ -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