mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
enable preimage for hash only
Signed-off-by: Delweng <delweng@gmail.com>
This commit is contained in:
parent
db92f7caee
commit
623d45a1d2
1 changed files with 4 additions and 2 deletions
|
|
@ -1634,9 +1634,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||||
}
|
}
|
||||||
// Read the value from the flag no matter if it's set or not.
|
// Read the value from the flag no matter if it's set or not.
|
||||||
cfg.Preimages = ctx.Bool(CachePreimagesFlag.Name)
|
cfg.Preimages = ctx.Bool(CachePreimagesFlag.Name)
|
||||||
if cfg.NoPruning && !cfg.Preimages {
|
// Only check the user's input for hash mode here; path is the default scheme,
|
||||||
|
// so we don't need to check the actual database scheme.
|
||||||
|
if cfg.NoPruning && !cfg.Preimages && ctx.String(StateSchemeFlag.Name) == rawdb.HashScheme {
|
||||||
cfg.Preimages = true
|
cfg.Preimages = true
|
||||||
log.Info("Enabling recording of key preimages since archive mode is used")
|
log.Info("Enabling recording of key preimages: required for archive mode with hash state scheme")
|
||||||
}
|
}
|
||||||
if ctx.IsSet(StateHistoryFlag.Name) {
|
if ctx.IsSet(StateHistoryFlag.Name) {
|
||||||
cfg.StateHistory = ctx.Uint64(StateHistoryFlag.Name)
|
cfg.StateHistory = ctx.Uint64(StateHistoryFlag.Name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue