From 10f4433dbbf47ec0728a7895ca99955aeff76573 Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Mon, 24 Apr 2023 19:38:32 +1000 Subject: [PATCH] =?UTF-8?q?hide=20=E2=80=94simulate-proof-failures=20behin?= =?UTF-8?q?d=20compile=20flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `--simulate-proof-failures` cli param is now only available when codex is compile using the `-d:codex_enable_proof_failures` flag. --- codex.nimble | 2 +- codex/conf.nim | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/codex.nimble b/codex.nimble index c137a222..3df0fb4a 100644 --- a/codex.nimble +++ b/codex.nimble @@ -66,7 +66,7 @@ task testContracts, "Build & run Codex Contract tests": test "testContracts" task testIntegration, "Run integration tests": - codexTask() + buildBinary "codex", params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE -d:codex_enable_proof_failures=true" test "testIntegration" task test, "Run tests": diff --git a/codex/conf.nim b/codex/conf.nim index 65b9ecfd..cac744c4 100644 --- a/codex/conf.nim +++ b/codex/conf.nim @@ -37,6 +37,7 @@ export DefaultCacheSizeMiB, net, DefaultQuotaBytes, DefaultBlockTtl, DefaultBloc const codex_enable_api_debug_peers* {.booldefine.} = false + codex_enable_proof_failures* {.booldefine.} = false type StartUpCommand* {.pure.} = enum @@ -239,12 +240,13 @@ type defaultValue: 1000 name: "validator-max-slots" .}: int - + simulateProofFailures* {. - desc: "Simulates proof failures once every N proofs. 0 = disabled." - defaultValue: 0 - name: "simulate-proof-failures" - .}: uint + desc: "Simulates proof failures once every N proofs. 0 = disabled." + defaultValue: 0 + name: "simulate-proof-failures" + hidden + .}: uint of initNode: discard