Skip to content

Commit 0879516

Browse files
committed
minor optimization, skipping v1 plots after they are completely phased-out
1 parent 5492f82 commit 0879516

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

chia/harvester/harvester_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ async def lookup_challenge(
398398
)
399399
passed += 1
400400
else:
401+
constants = self.harvester.constants
402+
# after the phase-out, ignore v1 plots
403+
if new_challenge.last_tx_height >= constants.HARD_FORK2_HEIGHT + constants.PLOT_V1_PHASE_OUT:
404+
continue
405+
401406
passed += 1
402407
awaitables.append(lookup_challenge(try_plot_filename, try_plot_info))
403408
self.harvester.log.debug(f"new_signage_point_harvester {passed} plots passed the plot filter")

chia/simulator/block_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,8 @@ def get_pospaces_for_challenge(
15531553
f"cannot be used for farming: {plot_info.prover.get_filename()}"
15541554
)
15551555
continue
1556+
elif prev_transaction_b_height >= constants.HARD_FORK2_HEIGHT + constants.PLOT_V1_PHASE_OUT:
1557+
continue
15561558

15571559
new_challenge: bytes32 = calculate_pos_challenge(plot_id, challenge_hash, signage_point)
15581560

0 commit comments

Comments
 (0)