apply comments

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2025-03-14 09:59:47 +00:00
parent 97dad429f2
commit 4ca2e8e7a2
4 changed files with 7 additions and 7 deletions

View file

@ -223,7 +223,7 @@ func initGenesis(ctx *cli.Context) error {
overrides.OverrideVerkle = &v
}
chaindb, err := stack.OpenDatabaseWithFreezer(ethconfig.ChainDbName, 0, 0, ctx.String(utils.AncientFlag.Name), ethconfig.ChainDbNamespace, false)
chaindb, err := stack.OpenDatabaseWithFreezer(ethconfig.DatabaseName, 0, 0, ctx.String(utils.AncientFlag.Name), ethconfig.DatabaseNamespace, false)
if err != nil {
utils.Fatalf("Failed to open database: %v", err)
}

View file

@ -2029,7 +2029,7 @@ func MakeChainDatabase(ctx *cli.Context, stack *node.Node, readonly bool) ethdb.
}
chainDb = remotedb.New(client)
default:
chainDb, err = stack.OpenDatabaseWithFreezer(ethconfig.ChainDbName, cache, handles, ctx.String(AncientFlag.Name), ethconfig.ChainDbNamespace, readonly)
chainDb, err = stack.OpenDatabaseWithFreezer(ethconfig.DatabaseName, cache, handles, ctx.String(AncientFlag.Name), ethconfig.DatabaseNamespace, readonly)
}
if err != nil {
Fatalf("Could not open database: %v", err)

View file

@ -128,7 +128,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
}
log.Info("Allocated trie memory caches", "clean", common.StorageSize(config.TrieCleanCache)*1024*1024, "dirty", common.StorageSize(config.TrieDirtyCache)*1024*1024)
chainDb, err := stack.OpenDatabaseWithFreezer("chaindata", config.DatabaseCache, config.DatabaseHandles, config.DatabaseFreezer, "eth/db/chaindata/", false)
chainDb, err := stack.OpenDatabaseWithFreezer(ethconfig.DatabaseName, config.DatabaseCache, config.DatabaseHandles, config.DatabaseFreezer, ethconfig.DatabaseNamespace, false)
if err != nil {
return nil, err
}

View file

@ -37,11 +37,11 @@ import (
)
const (
// ChainDbName is the name of the chain database
ChainDbName = "chaindata"
// DatabaseName is the name of the chain database
DatabaseName = "chaindata"
// ChainDbNamespace is the namespace for the chain database
ChainDbNamespace = "eth/db/chaindata/"
// DatabaseNamespace is the namespace for the chain database
DatabaseNamespace = "eth/db/chaindata/"
)
// FullNodeGPO contains default gasprice oracle settings for full node.