Remove from src.consensus.constants import constants.

This commit is contained in:
Richard Kiss 2020-06-24 12:39:58 -07:00 committed by Gene Hoffman
parent 05d6658eeb
commit aa66d1d13d
2 changed files with 2 additions and 2 deletions

View File

@ -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")

View File

@ -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
)