mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-27 18:29:26 +00:00
Merge 7e62dffd71 into 12eabbd76d
This commit is contained in:
commit
6072026b8b
1 changed files with 4 additions and 2 deletions
|
|
@ -1841,7 +1841,7 @@ 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" {
|
if cfg.NoPruning {
|
||||||
if cfg.TransactionHistory != 0 {
|
if cfg.TransactionHistory != 0 {
|
||||||
cfg.TransactionHistory = 0
|
cfg.TransactionHistory = 0
|
||||||
log.Warn("Disabled transaction unindexing for archive node")
|
log.Warn("Disabled transaction unindexing for archive node")
|
||||||
|
|
@ -2434,7 +2434,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
|
||||||
TrieCleanLimit: ethconfig.Defaults.TrieCleanCache,
|
TrieCleanLimit: ethconfig.Defaults.TrieCleanCache,
|
||||||
NoPrefetch: ctx.Bool(CacheNoPrefetchFlag.Name),
|
NoPrefetch: ctx.Bool(CacheNoPrefetchFlag.Name),
|
||||||
TrieDirtyLimit: ethconfig.Defaults.TrieDirtyCache,
|
TrieDirtyLimit: ethconfig.Defaults.TrieDirtyCache,
|
||||||
ArchiveMode: ctx.String(GCModeFlag.Name) == "archive",
|
|
||||||
TrieTimeLimit: ethconfig.Defaults.TrieTimeout,
|
TrieTimeLimit: ethconfig.Defaults.TrieTimeout,
|
||||||
SnapshotLimit: ethconfig.Defaults.SnapshotCache,
|
SnapshotLimit: ethconfig.Defaults.SnapshotCache,
|
||||||
Preimages: ctx.Bool(CachePreimagesFlag.Name),
|
Preimages: ctx.Bool(CachePreimagesFlag.Name),
|
||||||
|
|
@ -2459,6 +2458,9 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
|
||||||
// Configure the slow block statistic logger (disabled by default)
|
// Configure the slow block statistic logger (disabled by default)
|
||||||
SlowBlockThreshold: ethconfig.Defaults.SlowBlockThreshold,
|
SlowBlockThreshold: ethconfig.Defaults.SlowBlockThreshold,
|
||||||
}
|
}
|
||||||
|
if ctx.IsSet(GCModeFlag.Name) {
|
||||||
|
options.ArchiveMode = ctx.String(GCModeFlag.Name) == "archive"
|
||||||
|
}
|
||||||
// Only enable slow block logging if the flag was explicitly set
|
// Only enable slow block logging if the flag was explicitly set
|
||||||
if ctx.IsSet(LogSlowBlockFlag.Name) {
|
if ctx.IsSet(LogSlowBlockFlag.Name) {
|
||||||
options.SlowBlockThreshold = ctx.Duration(LogSlowBlockFlag.Name)
|
options.SlowBlockThreshold = ctx.Duration(LogSlowBlockFlag.Name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue