Skip to content

Commit c796b45

Browse files
authored
simplify back-end selection in brun, and fix auto-detection (#92)
1 parent f49007d commit c796b45

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

clvm_tools/cmds.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,18 @@ def launch_tool(args, tool_name, default_stage=0):
218218
try:
219219
output = "(didn't finish)"
220220

221-
use_rust = (
222-
(tool_name != "run")
223-
and not pre_eval_f
224-
and (
225-
args.backend == "rust"
226-
or (run_chia_program and args.backend != "python")
221+
if args.backend == "rust":
222+
use_rust = True
223+
elif args.backend == "python":
224+
use_rust = False
225+
else:
226+
use_rust = (
227+
tool_name != "run"
228+
and not pre_eval_f
229+
and run_chia_program
230+
and args.stage.__name__ == "stages.stage_0"
227231
)
228-
and args.stage == 0
229-
)
232+
230233
max_cost = args.max_cost
231234
if use_rust:
232235
time_parse_input = time.perf_counter()

0 commit comments

Comments
 (0)