Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor new_peak_timelord #16881

Merged
merged 31 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
15987ca
refactor new_peak_timelord
almogdepaz Nov 20, 2023
019f7e4
fix test
almogdepaz Nov 20, 2023
f3f929e
improve test assertions
almogdepaz Nov 22, 2023
41dd423
lint
almogdepaz Nov 22, 2023
fe1a065
return after skipping peak
almogdepaz Nov 30, 2023
9a18571
improve comments
almogdepaz Dec 4, 2023
e157e21
limit condition to a diff of one block
almogdepaz Dec 4, 2023
90cd222
remove log
almogdepaz Dec 4, 2023
9a18f0c
refactor test
almogdepaz Dec 4, 2023
9b377c0
better conditions
almogdepaz Dec 6, 2023
91654e7
Merge branch 'main' into refactor_new_peak_timelord
almogdepaz Dec 6, 2023
e90249d
pre commit
almogdepaz Dec 6, 2023
195710d
test with overflow
almogdepaz Dec 11, 2023
200805a
add test for EOS case
almogdepaz Feb 8, 2024
2400f4f
Merge branch 'main' into refactor_new_peak_timelord
almogdepaz Feb 8, 2024
5aacf1b
lint
almogdepaz Feb 8, 2024
20bc277
comment
almogdepaz Feb 8, 2024
eb565b2
prefer lower iterations peaks
almogdepaz Feb 14, 2024
16adbc7
test full node receiving same weight lower iterations
almogdepaz Feb 20, 2024
91d46dc
lint
almogdepaz Feb 20, 2024
c4e973c
fix reorg test, lint
almogdepaz Feb 26, 2024
ee5098c
fix block tools bug
almogdepaz Feb 26, 2024
3233b3d
use signage point param in test
almogdepaz Feb 26, 2024
155d6fb
use signage point param for overflows as well
almogdepaz Mar 4, 2024
fb23f5f
remove unused case
almogdepaz Mar 11, 2024
7d15254
fix block_tools condition
almogdepaz Mar 13, 2024
f8c52f1
Merge branch 'main' into refactor_new_peak_timelord
almogdepaz Mar 25, 2024
cf246f1
lint
almogdepaz Mar 25, 2024
c605b94
lint
almogdepaz Mar 25, 2024
9173620
Merge remote-tracking branch 'origin/main' into refactor_new_peak_tim…
emlowe Jul 24, 2024
6ac100b
Add check for peak not none in test
emlowe Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion chia/_tests/blockchain/test_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3627,8 +3627,15 @@ async def test_reorg_new_ref(empty_blockchain: Blockchain, bt: BlockTools) -> No
fork_info: Optional[ForkInfo] = None
if i < 10:
expected = AddBlockResult.ALREADY_HAVE_BLOCK
elif i < 20:
elif i < 19:
expected = AddBlockResult.ADDED_AS_ORPHAN
elif i == 19:
# same height as peak decide by iterations
peak = b.get_peak()
assert peak is not None
# same height as peak should be ADDED_AS_ORPHAN if block.total_iters >= peak.total_iters
assert block.total_iters < peak.total_iters
expected = AddBlockResult.NEW_PEAK
else:
expected = AddBlockResult.NEW_PEAK
if fork_info is None:
Expand Down
Loading
Loading