From e695fad0bed8f0962adca40df24baa979e52c639 Mon Sep 17 00:00:00 2001 From: bruce-riley <96066700+bruce-riley@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:05:16 -0500 Subject: [PATCH] Node: Don't lock memory in testnet (#2780) * Node: Don't lock memory in testnet Change-Id: Id32ce1af82f50a947e80949a54232e11ee7c48ea * Don't lock in ram for devnet either Change-Id: I4e3817e726b535661727d05a0c5f65cd613c4900 --- node/cmd/guardiand/node.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/node/cmd/guardiand/node.go b/node/cmd/guardiand/node.go index 6ef81d038..b7d1492c0 100644 --- a/node/cmd/guardiand/node.go +++ b/node/cmd/guardiand/node.go @@ -415,7 +415,12 @@ func runNode(cmd *cobra.Command, args []string) { fmt.Print(devwarning) } - common.LockMemory() + if *testnetMode || *unsafeDevMode { + fmt.Println("Not locking in memory.") + } else { + common.LockMemory() + } + common.SetRestrictiveUmask() // Refuse to run as root in production mode.