We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a7010a commit cbb47d1Copy full SHA for cbb47d1
core/blockchain_arbitrum.go
@@ -19,7 +19,6 @@ package core
19
20
import (
21
"fmt"
22
- "sync"
23
"time"
24
25
"github.com/ethereum/go-ethereum/common"
@@ -30,13 +29,15 @@ import (
30
29
"github.com/ethereum/go-ethereum/rpc"
31
)
32
33
-func (bc *BlockChain) FlushTrieDB(advanceBlockChainMutex *sync.Mutex, capLimit common.StorageSize) error {
+func (bc *BlockChain) FlushTrieDB(capLimit common.StorageSize) error {
34
if bc.triedb.Scheme() == rawdb.PathScheme {
35
return nil
36
}
37
38
- advanceBlockChainMutex.Lock()
39
- defer advanceBlockChainMutex.Unlock()
+ if !bc.chainmu.TryLock() {
+ return errChainStopped
+ }
40
+ defer bc.chainmu.Unlock()
41
42
if !bc.triegc.Empty() {
43
_, triegcBlockNumber := bc.triegc.Peek()
0 commit comments