cmdtest.py regtest: cleanups

This commit is contained in:
The MMGen Project 2024-10-08 12:55:57 +00:00
commit 647c7a2601
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 10 additions and 7 deletions

View file

@ -169,7 +169,7 @@ class MMGenRegtest(MMGenObject):
# BCH and LTC daemons refuse to set HD seed with empty blockchain ("in IBD" error),
# so generate a block:
await self.generate(1,silent=False)
await self.generate(1)
# Unfortunately, we don’t get deterministic output with BCH and LTC even with fixed
# hdseed, as their 'sendtoaddress' calls produce non-deterministic TXIDs due to random
@ -182,8 +182,9 @@ class MMGenRegtest(MMGenObject):
wallet = 'miner')
# Broken litecoind can only mine 431 blocks in regtest mode, so generate just enough
# blocks to fund the test suite
await self.generate(392,silent=True)
# blocks to fund the test suite. Generation is slow, so divide into chunks:
for n in (100, 100, 100, 92): # 392 blocks
await self.generate(n)
gmsg('Setup complete')

View file

@ -531,8 +531,10 @@ class CmdTestRegtest(CmdTestBase,CmdTestShared):
'mmgen-regtest',
(['--bdb-wallet'] if self.use_bdb_wallet else [])
+ ['--setup-no-stop-daemon', 'setup'])
for s in ('Starting','Creating','Creating','Creating','Mined','Setup complete'):
t.expect(s)
t.expect('Starting')
for _ in range(3): t.expect('Creating')
for _ in range(5): t.expect('Mined')
t.expect('Setup complete')
return t
def daemon_version(self):

View file

@ -198,7 +198,7 @@ init_tests() {
d_bch="overall operations with emulated RPC data (Bitcoin Cash Node)"
t_bch="
- $cmdtest_py --coin=bch --exclude regtest
- $cmdtest_py --coin=bch --exclude regtest,autosign_automount
- $cmdtest_py --coin=bch --cashaddr=0 ref3_addr
"
@ -213,7 +213,7 @@ init_tests() {
d_ltc="overall operations with emulated RPC data (Litecoin)"
t_ltc="
- $cmdtest_py --coin=ltc --exclude regtest
- $cmdtest_py --coin=ltc --exclude regtest,autosign_automount
- $cmdtest_py --coin=ltc --segwit
- $cmdtest_py --coin=ltc --segwit-random
- $cmdtest_py --coin=ltc --bech32