|
|
@@ -1598,6 +1598,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
|
|
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) {
|
|
|
cfg.TrieDirtyCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100
|
|
|
}
|
|
|
+ if ctx.GlobalIsSet(TriesInMemoryFlag.Name) {
|
|
|
+ cfg.TriesInMemory = ctx.GlobalUint64(TriesInMemoryFlag.Name)
|
|
|
+ }
|
|
|
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheSnapshotFlag.Name) {
|
|
|
cfg.SnapshotCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheSnapshotFlag.Name) / 100
|
|
|
}
|
|
|
@@ -1924,6 +1927,9 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
|
|
|
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) {
|
|
|
cache.TrieDirtyLimit = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100
|
|
|
}
|
|
|
+ if ctx.GlobalIsSet(TriesInMemoryFlag.Name) {
|
|
|
+ cache.TriesInMemory = ctx.GlobalUint64(TriesInMemoryFlag.Name)
|
|
|
+ }
|
|
|
vmcfg := vm.Config{EnablePreimageRecording: ctx.GlobalBool(VMEnableDebugFlag.Name)}
|
|
|
|
|
|
// TODO(rjl493456442) disable snapshot generation/wiping if the chain is read only.
|