From 39f2d421533fd3986e4c5c16a796f125338f543c Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 23 Nov 2023 04:34:36 +0100 Subject: remove MAX_STEPS --- rtt-module.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/rtt-module.js b/rtt-module.js index e8f0cae..6e63f04 100755 --- a/rtt-module.js +++ b/rtt-module.js @@ -6,11 +6,10 @@ const fs = require("fs") const { FuzzedDataProvider } = require("@jazzer.js/core") const RULES_JS_FILE = process.env.RTT_RULES || "rules.js" -const MAX_STEPS = parseInt(process.env.MAX_STEPS) || 2048 const NO_UNDO = process.env.NO_UNDO === 'true' const NO_RESIGN = process.env.NO_RESIGN === 'true' -console.log(`Loading rtt-fuzzer RTT_RULES='${RULES_JS_FILE}' MAX_STEPS=${MAX_STEPS}`) +console.log(`Loading rtt-fuzzer RTT_RULES='${RULES_JS_FILE}'`) if (!fs.existsSync(RULES_JS_FILE)) { throw Error("rules.js not found, specify via RTT_RULES environment variable.") } @@ -70,11 +69,6 @@ module.exports.fuzz = function(fuzzerInputData) { } } - if (step > MAX_STEPS) { - log_crash(game_setup, state, view, step, active) - throw new MaxStepsExceededError(`Maximum step count (MAX_STEPS=${MAX_STEPS}) exceeded`) - } - if (state.state === 'game_over') { break } @@ -154,13 +148,6 @@ function log_crash(game_setup, state, view, step, active, action=undefined, args } // Custom Error classes, allowing us to ignore expected errors with -x -class MaxStepsExceededError extends Error { - constructor(message) { - super(message) - this.name = "MaxStepsExceededError" - } -} - class UnknownStateError extends Error { constructor(message) { super(message) -- cgit v1.2.3