mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
cmd/utils: skip memory-limit sanitize when total memory is unknown (#35407)
This commit is contained in:
parent
ff44a796a1
commit
af03a271df
1 changed files with 1 additions and 1 deletions
|
|
@ -1793,7 +1793,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
|||
|
||||
if ctx.IsSet(MemoryLimitFlag.Name) {
|
||||
memLimit := int64(ctx.Int(MemoryLimitFlag.Name)) * 1024 * 1024
|
||||
if memLimit > int64(total) {
|
||||
if total > 0 && memLimit > int64(total) {
|
||||
log.Info("Sanitizing memory limit", "provided(MB)", memLimit/1024/1024, "updated(MB)", total/1024/1024)
|
||||
memLimit = int64(total)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue