mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2025-01-08 18:34:27 +03:00
Adapt some tests to the recent limit_consensus_modes mark (#16220)
Adapt some tests to the recent limit_consensus_modes mark.
This commit is contained in:
parent
f5f9138470
commit
09f5873eb5
@ -1366,10 +1366,16 @@ class TestBlockHeaderValidation:
|
||||
return None
|
||||
attempts += 1
|
||||
|
||||
@pytest.mark.limit_consensus_modes(
|
||||
allowed=[
|
||||
ConsensusMode.PLAIN,
|
||||
ConsensusMode.HARD_FORK_2_0,
|
||||
ConsensusMode.SOFT_FORK3,
|
||||
],
|
||||
reason="Skipped ConsensusMode.SOFT_FORK4 temporarily until adding more pool plots.",
|
||||
)
|
||||
@pytest.mark.asyncio
|
||||
async def test_pool_target_contract(self, empty_blockchain, bt, consensus_mode: ConsensusMode):
|
||||
if consensus_mode == ConsensusMode.SOFT_FORK4:
|
||||
pytest.skip("Skipped temporarily until adding more pool plots.")
|
||||
# 20c invalid pool target with contract
|
||||
blocks_initial = bt.get_consecutive_blocks(2)
|
||||
await _validate_and_add_block(empty_blockchain, blocks_initial[0])
|
||||
|
@ -415,12 +415,11 @@ class TestFullSync:
|
||||
duration = time.time() - start
|
||||
assert duration > 5
|
||||
|
||||
@pytest.mark.limit_consensus_modes(reason="save time")
|
||||
@pytest.mark.asyncio
|
||||
async def test_bad_peak_in_cache(
|
||||
self, two_nodes, default_400_blocks, blockchain_constants, self_hostname, consensus_mode
|
||||
):
|
||||
if consensus_mode != ConsensusMode.PLAIN:
|
||||
pytest.skip("Skipped test")
|
||||
full_node_1, full_node_2, server_1, server_2, bt = two_nodes
|
||||
bt.constants = blockchain_constants.replace(SOFT_FORK4_HEIGHT=1000000)
|
||||
blocks = bt.get_consecutive_blocks(700, default_400_blocks)
|
||||
@ -439,12 +438,11 @@ class TestFullSync:
|
||||
wp = await full_node_2.full_node.weight_proof_handler.get_proof_of_weight(peak.header_hash)
|
||||
assert full_node_1.full_node.in_bad_peak_cache(wp) is True
|
||||
|
||||
@pytest.mark.limit_consensus_modes(reason="save time")
|
||||
@pytest.mark.asyncio
|
||||
async def test_skip_bad_peak_validation(
|
||||
self, two_nodes, default_400_blocks, blockchain_constants, self_hostname, consensus_mode
|
||||
):
|
||||
if consensus_mode != ConsensusMode.PLAIN:
|
||||
pytest.skip("Skipped test")
|
||||
full_node_1, full_node_2, server_1, server_2, bt = two_nodes
|
||||
blocks = bt.get_consecutive_blocks(700, default_400_blocks)
|
||||
full_node_2.full_node.blockchain.constants = blockchain_constants.replace(SOFT_FORK4_HEIGHT=1000000)
|
||||
|
Loading…
Reference in New Issue
Block a user