Skip to content

Commit

Permalink
core: refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjunLi committed Apr 15, 2024
1 parent 725c254 commit 288c534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
path string
)
if config.JournalFileEnabled {
if stack.IsSeparatedDB() {
if stack.CheckIfMultiDataBase() {
path = ChainData + "/state"
} else {
path = ChainData
Expand Down
4 changes: 2 additions & 2 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,12 +822,12 @@ func (n *Node) OpenAndMergeDatabase(name string, namespace string, readonly bool
disableChainDbFreeze = true

// Allocate half of the handles and chainDbCache to this separate state data database
stateDiskDb, err = n.OpenDatabaseWithFreezer(name+"/state", stateDbCache, stateDbHandles, "", "eth/db/state/", readonly, true, false, config.PruneAncientData)
stateDiskDb, err = n.OpenDatabaseWithFreezer(name+"/state", stateDbCache, stateDbHandles, "", "eth/db/statedata/", readonly, true, false, config.PruneAncientData)
if err != nil {
return nil, err
}

blockDb, err = n.OpenDatabaseWithFreezer(name+"/block", blockDbCacheSize, blockDbHandlesSize, "", "eth/db/block/", readonly, false, false, config.PruneAncientData)
blockDb, err = n.OpenDatabaseWithFreezer(name+"/block", blockDbCacheSize, blockDbHandlesSize, "", "eth/db/blockdata/", readonly, false, false, config.PruneAncientData)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 288c534

Please sign in to comment.