speed up the long-reorg tests by disabling VDF- and signature validation (#20760)

speed up the long-reorg tests by disabling VDF- and signature validation of blocks
This commit is contained in:
Arvid Norberg
2026-04-02 09:58:09 -05:00
committed by GitHub
parent 81ef45db5f
commit 38ad30d9e7
+6 -1
View File
@@ -3434,7 +3434,10 @@ class TestReorgs:
test_long_reorg_blocks: list[FullBlock],
test_long_reorg_blocks_light: list[FullBlock],
consensus_mode: ConsensusMode,
monkeypatch: pytest.MonkeyPatch,
) -> None:
monkeypatch.setattr("chia.consensus.block_header_validation.validate_vdf", lambda *a, **kw: True)
monkeypatch.setattr("chia.consensus.block_header_validation.AugSchemeMPL.verify", lambda *a, **kw: True)
if light_blocks:
reorg_blocks = test_long_reorg_blocks_light[:1650]
elif consensus_mode >= ConsensusMode.HARD_FORK_3_0:
@@ -4052,7 +4055,9 @@ async def test_chain_failed_rollback(empty_blockchain: Blockchain, bt: BlockTool
@pytest.mark.anyio
@pytest.mark.skipif(_is_macos_intel(), reason="Slow on macOS Intel")
async def test_reorg_flip_flop(empty_blockchain: Blockchain, bt: BlockTools) -> None:
async def test_reorg_flip_flop(empty_blockchain: Blockchain, bt: BlockTools, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr("chia.consensus.block_header_validation.validate_vdf", lambda *a, **kw: True)
monkeypatch.setattr("chia.consensus.block_header_validation.AugSchemeMPL.verify", lambda *a, **kw: True)
b = empty_blockchain
wallet_a = WalletTool(b.constants)
WALLET_A_PUZZLE_HASHES = [wallet_a.get_new_puzzlehash() for _ in range(5)]