mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user