new daemon_state_timeout, test_suite_devnet_block_period cfg vars

This commit is contained in:
The MMGen Project 2025-09-09 11:27:05 +00:00
commit ab7a97842c
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 11 additions and 2 deletions

View file

@ -173,6 +173,7 @@ class Config(Lockable):
# limits
http_timeout = 0
daemon_state_timeout = 60
usr_randchars = 30
fee_adjust = 1.0
fee_estimate_confs = 3
@ -250,6 +251,7 @@ class Config(Lockable):
test_suite = False
test_suite_autosign_led_simulate = False
test_suite_autosign_threaded = False
test_suite_devnet_block_period = 0
test_suite_xmr_autosign = False
test_suite_cfgtest = False
test_suite_deterministic = False
@ -331,6 +333,7 @@ class Config(Lockable):
'MMGEN_TEST_SUITE',
'MMGEN_TEST_SUITE_AUTOSIGN_LED_SIMULATE',
'MMGEN_TEST_SUITE_AUTOSIGN_THREADED',
'MMGEN_TEST_SUITE_DEVNET_BLOCK_PERIOD',
'MMGEN_TEST_SUITE_XMR_AUTOSIGN',
'MMGEN_TEST_SUITE_CFGTEST',
'MMGEN_TEST_SUITE_DETERMINISTIC',
@ -342,6 +345,7 @@ class Config(Lockable):
'MMGEN_BLACKLIST_DAEMONS',
'MMGEN_BOGUS_SEND',
'MMGEN_BOGUS_UNSPENT_DATA',
'MMGEN_DAEMON_STATE_TIMEOUT',
'MMGEN_DEBUG',
'MMGEN_DEBUG_DAEMON',
'MMGEN_DEBUG_EVM',

View file

@ -235,7 +235,7 @@ class Daemon(Lockable):
return True
def wait_for_state(self, req_state):
for _ in range(300):
for _ in range(self.cfg.daemon_state_timeout * 5):
if self.state == req_state:
return True
time.sleep(0.2)

View file

@ -40,7 +40,10 @@ class CmdTestEthBumpMethods:
@property
def devnet_block_period(self):
return self.cfg.devnet_block_period or self.dfl_devnet_block_period[self.daemon.id]
return (
self.cfg.devnet_block_period
or self.cfg.test_suite_devnet_block_period
or self.dfl_devnet_block_period[self.daemon.id])
def _txcreate(self, args, acct):
self.get_file_with_ext('rawtx', delete_all=True)
@ -278,6 +281,8 @@ class CmdTestEthBump(CmdTestEthBumpMethods, CmdTestEthSwapMethods, CmdTestSwapMe
'geth': [f'--dev.period={self.devnet_block_period}']
}[self.daemon.id]
imsg(f'devnet block period: {self.devnet_block_period}')
globals()[self.cross_group] = self.create_cross_runner(trunner)
self.swap_server = ThornodeSwapServer()