Skip to content

Commit 66631f9

Browse files
committed
arvids changes
1 parent 23b2e10 commit 66631f9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

chia/_tests/util/full_sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ async def run_sync_test(
142142
config = load_config(root_path, "config.yaml")
143143

144144
if test_constants:
145-
constants = TEST_CONSTANTS
145+
# this allows all blocks have compressed generators
146+
constants = TEST_CONSTANTS.replace(HARD_FORK_HEIGHT=0)
146147
else:
147148
overrides = config["network_overrides"]["constants"][config["selected_network"]]
148149
constants = replace_str_to_bytes(DEFAULT_CONSTANTS, **overrides)

chia/simulator/block_tools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,10 @@ def setup_new_gen(
403403
assert rng is not None
404404
bundle, additions = make_spend_bundle(available_coins, wallet, rng)
405405
removals = bundle.removals()
406-
program = simple_solution_generator(bundle).program
406+
if curr.height >= self.constants.HARD_FORK_HEIGHT:
407+
program = simple_solution_generator_backrefs(bundle).program
408+
else:
409+
program = simple_solution_generator(bundle).program
407410
cost = compute_block_cost(program, self.constants, uint32(curr.height + 1), prev_tx_height)
408411
return NewBlockGenerator(
409412
program,

0 commit comments

Comments
 (0)