Use common testing constant for minimum operator seconds.

pull/3241/head
derekpierre 2023-09-21 20:11:54 -04:00
parent 27dc351122
commit cbfb8a7e35
3 changed files with 9 additions and 5 deletions

View File

@ -19,6 +19,7 @@ from nucypher.utilities.logging import Logger
from tests.constants import (
BONUS_TOKENS_FOR_TESTS,
INSECURE_DEVELOPMENT_PASSWORD,
MIN_OPERATOR_SECONDS,
TEST_ETH_PROVIDER_URI,
TESTERCHAIN_CHAIN_ID,
)
@ -41,8 +42,6 @@ NU_TOTAL_SUPPLY = Web3.to_wei(
# TACo Application
MIN_AUTHORIZATION = Web3.to_wei(40_000, "ether")
MIN_OPERATOR_SECONDS = 24 * 60 * 60
REWARD_DURATION = 60 * 60 * 24 * 7 # one week in seconds
DEAUTHORIZATION_DURATION = 60 * 60 * 24 * 60 # 60 days in seconds

View File

@ -118,6 +118,12 @@ MOCK_IP_ADDRESS_2 = '203.0.113.20'
FEE_RATE_RANGE = (5, 10, 15)
#
# Configuration
#
MIN_OPERATOR_SECONDS = 60 * 60 * 24 # one day in seconds
#
# Gas

View File

@ -43,6 +43,7 @@ from nucypher.utilities.emitters import StdoutEmitter
from nucypher.utilities.logging import GlobalLoggerSettings, Logger
from nucypher.utilities.networking import LOOPBACK_ADDRESS
from tests.constants import (
MIN_OPERATOR_SECONDS,
MOCK_CUSTOM_INSTALLATION_PATH,
MOCK_CUSTOM_INSTALLATION_PATH_2,
MOCK_ETH_PROVIDER_URI,
@ -360,9 +361,7 @@ def policy_rate():
@pytest.fixture(scope='module')
def policy_value(policy_rate):
# TODO constant?
min_operator_seconds = 60 * 60 * 24 # one day in seconds
value = policy_rate * min_operator_seconds
value = policy_rate * MIN_OPERATOR_SECONDS
return value