From aa66d1d13def2e2d414d0cf829ad84ac0ebcde74 Mon Sep 17 00:00:00 2001 From: Richard Kiss Date: Wed, 24 Jun 2020 12:39:58 -0700 Subject: [PATCH] Remove `from src.consensus.constants import constants`. --- tests/setup_nodes.py | 1 + tests/test_cost_calculation.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/setup_nodes.py b/tests/setup_nodes.py index a92d746feed56..a29dc8425d3f1 100644 --- a/tests/setup_nodes.py +++ b/tests/setup_nodes.py @@ -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") diff --git a/tests/test_cost_calculation.py b/tests/test_cost_calculation.py index c4594424ad2b6..add0fd3bde326 100644 --- a/tests/test_cost_calculation.py +++ b/tests/test_cost_calculation.py @@ -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 )