diff --git a/mmgen/cfg.py b/mmgen/cfg.py index 87357656..ac8a19c3 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -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', diff --git a/mmgen/daemon.py b/mmgen/daemon.py index e77eb284..997ec4a8 100755 --- a/mmgen/daemon.py +++ b/mmgen/daemon.py @@ -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) diff --git a/test/cmdtest_d/ethbump.py b/test/cmdtest_d/ethbump.py index f3644fea..3f95e8ae 100755 --- a/test/cmdtest_d/ethbump.py +++ b/test/cmdtest_d/ethbump.py @@ -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()