mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-12-01 20:05:43 +03:00
Remove from src.consensus.constants import constants
.
This commit is contained in:
parent
05d6658eeb
commit
aa66d1d13d
@ -42,6 +42,7 @@ test_constants: Dict[str, Any] = {
|
||||
"TX_PER_SEC": 1,
|
||||
"MEMPOOL_BLOCK_BUFFER": 10,
|
||||
"MIN_ITERS_STARTING": 50 * 1,
|
||||
"CLVM_COST_RATIO_CONSTANT": 108,
|
||||
}
|
||||
test_constants["GENESIS_BLOCK"] = bytes(
|
||||
bt.create_genesis_block(test_constants, bytes([0] * 32), b"0")
|
||||
|
@ -2,7 +2,6 @@ import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from src.consensus.constants import constants
|
||||
from src.util.bundle_tools import best_solution_program
|
||||
from src.util.cost_calculator import calculate_cost_of_program
|
||||
from src.util.mempool_check_conditions import get_name_puzzle_conditions
|
||||
@ -46,7 +45,7 @@ class TestCostCalculation:
|
||||
error, npc_list, cost = get_name_puzzle_conditions(program)
|
||||
|
||||
# Create condition + agg_sig_condition + length + cpu_cost
|
||||
ratio = constants["CLVM_COST_RATIO_CONSTANT"]
|
||||
ratio = test_constants["CLVM_COST_RATIO_CONSTANT"]
|
||||
assert (
|
||||
clvm_cost == 200 * ratio + 20 * ratio + len(bytes(program)) * ratio + cost
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user