mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-23 16:29:26 +00:00
cmd/utils: force hash scheme for archive mode (#31439)
This commit is contained in:
parent
80b8d7a13c
commit
8e3cd41b04
1 changed files with 9 additions and 5 deletions
|
|
@ -1659,12 +1659,16 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||||
log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions")
|
log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions")
|
||||||
cfg.TransactionHistory = ctx.Uint64(TxLookupLimitFlag.Name)
|
cfg.TransactionHistory = ctx.Uint64(TxLookupLimitFlag.Name)
|
||||||
}
|
}
|
||||||
if ctx.String(GCModeFlag.Name) == "archive" && cfg.TransactionHistory != 0 {
|
if ctx.String(GCModeFlag.Name) == "archive" {
|
||||||
cfg.TransactionHistory = 0
|
if cfg.TransactionHistory != 0 {
|
||||||
log.Warn("Disabled transaction unindexing for archive node")
|
cfg.TransactionHistory = 0
|
||||||
|
log.Warn("Disabled transaction unindexing for archive node")
|
||||||
|
}
|
||||||
|
|
||||||
cfg.StateScheme = rawdb.HashScheme
|
if cfg.StateScheme != rawdb.HashScheme {
|
||||||
log.Warn("Forcing hash state-scheme for archive mode")
|
cfg.StateScheme = rawdb.HashScheme
|
||||||
|
log.Warn("Forcing hash state-scheme for archive mode")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ctx.IsSet(LogHistoryFlag.Name) {
|
if ctx.IsSet(LogHistoryFlag.Name) {
|
||||||
cfg.LogHistory = ctx.Uint64(LogHistoryFlag.Name)
|
cfg.LogHistory = ctx.Uint64(LogHistoryFlag.Name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue