whitespace, minor testing fixes
This commit is contained in:
parent
ef61dd104c
commit
a97e0581d4
7 changed files with 44 additions and 19 deletions
|
|
@ -109,7 +109,7 @@ MEMOLESS SWAP EXAMPLES:
|
|||
|
||||
$ {gc.prog_name} --memoless BTC 0.1234 XMR
|
||||
|
||||
Send the registration transaction:
|
||||
Send the registration transaction to the THORChain network:
|
||||
|
||||
$ mmgen-txsend
|
||||
=> TxID
|
||||
|
|
@ -117,6 +117,7 @@ MEMOLESS SWAP EXAMPLES:
|
|||
Get the reference number from the THORChain network:
|
||||
|
||||
$ mmgen-remote --coin=rune get_refnum TxID
|
||||
=> REFNUM
|
||||
|
||||
Create a BTC-to-XMR swap transaction using the reference number:
|
||||
|
||||
|
|
|
|||
|
|
@ -80,11 +80,7 @@ class OpWallet(OpBase):
|
|||
|
||||
if self.cfg.offline:
|
||||
from ...wallet import Wallet
|
||||
self.seed_src = Wallet(
|
||||
cfg = cfg,
|
||||
fn = self.uargs.infile,
|
||||
ignore_in_fmt = True)
|
||||
|
||||
self.seed_src = Wallet(cfg=cfg, fn=self.uargs.infile, ignore_in_fmt=True)
|
||||
gmsg('\nCreating ephemeral key-address list for offline wallets')
|
||||
self.kal = self.gen_keyaddr_list(self.uargs.wallets)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1636,7 +1636,10 @@ class CmdTestRegtest(CmdTestBase, CmdTestShared):
|
|||
time.sleep(0.2)
|
||||
t = self.spawn('mmgen-regtest', self.regtest_opts + ['cli', 'unloadwallet', 'carol'])
|
||||
t.ok()
|
||||
wdir = joinpath((await self.rt.rpc).daemon.network_datadir, 'carol')
|
||||
ndd = (await self.rt.rpc).daemon.network_datadir
|
||||
wdir = (
|
||||
joinpath(ndd, 'wallets', 'carol') if self.deterministic else
|
||||
joinpath(ndd, 'carol'))
|
||||
from shutil import rmtree
|
||||
imsg('Deleting Carol’s tracking wallet')
|
||||
rmtree(wdir)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import os, re, asyncio, json
|
|||
from mmgen.util import suf
|
||||
from mmgen.color import blue, cyan, brown
|
||||
from mmgen.fileutil import get_data_from_file
|
||||
from mmgen.addrlist import AddrIdxList
|
||||
|
||||
from ..include.common import (
|
||||
imsg,
|
||||
|
|
@ -258,7 +259,6 @@ class CmdTestXMRAutosign(CmdTestXMRWallet, CmdTestAutosignThreaded, CmdTestShare
|
|||
return self.autosign_xmr_setup(write_viewkeys=False)
|
||||
|
||||
def autosign_xmr_setup(self, write_viewkeys=True):
|
||||
from mmgen.addrlist import AddrIdxList
|
||||
al = AddrIdxList(fmt_str=self.users[self.user].kal_range)
|
||||
|
||||
self.insert_device_online()
|
||||
|
|
@ -619,13 +619,14 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|||
return self._addrimport_user(create_address_files=True)
|
||||
|
||||
def addrimport_user2(self):
|
||||
return self._addrimport_user(expect_str='Skipping.*Skipping')
|
||||
return self._addrimport_user()
|
||||
|
||||
def _addrimport_user(self, *, expect_str=None, create_address_files=False):
|
||||
def _addrimport_user(self, *, create_address_files=False):
|
||||
self.insert_device_online()
|
||||
t = self.spawn('mmgen-addrimport', self.user_opts + self.autosign_opts)
|
||||
if expect_str:
|
||||
t.expect(expect_str, regex=True)
|
||||
al = AddrIdxList(fmt_str=self.users[self.user].kal_range)
|
||||
for n in range(len(al)):
|
||||
t.expect(['Creating', 'Skipping'])
|
||||
if create_address_files:
|
||||
self._create_address_files(t, self.user, watch_only=True)
|
||||
t.read() # required!
|
||||
|
|
@ -793,6 +794,10 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|||
menu_prompt = self.listaddresses_menu_prompt if op == 'listaddresses' else self.menu_prompt
|
||||
have_lbl = lbl_acct_num or newacct_wallet_num or newaddr_acct_num
|
||||
have_new_addr = newacct_wallet_num or newaddr_acct_num
|
||||
al = AddrIdxList(fmt_str=self.users[self.user].kal_range)
|
||||
for n in range(len(al)):
|
||||
t.expect('Loading')
|
||||
t.expect('Opening')
|
||||
if pexpect_interact:
|
||||
t.p.interact() # pexpect interact() is currently broken
|
||||
self.remove_device_online()
|
||||
|
|
@ -815,6 +820,12 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|||
t.expect('(y/N): ', 'y')
|
||||
for ch in menu:
|
||||
t.expect(menu_prompt, ch)
|
||||
if ch == 'R':
|
||||
for n in range(len(al)):
|
||||
t.expect('Syncing')
|
||||
for n in range(len(al)):
|
||||
t.expect('Loading')
|
||||
t.expect('Opening')
|
||||
if expect_str:
|
||||
t.expect(expect_str, regex=True)
|
||||
t.expect(menu_prompt, 'q')
|
||||
|
|
@ -902,9 +913,12 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|||
signable_desc = 'transaction',
|
||||
expect_str = None,
|
||||
exit_val = 0):
|
||||
|
||||
if wait_signed:
|
||||
self._wait_signed(signable_desc)
|
||||
|
||||
self.insert_device_online()
|
||||
|
||||
t = self.spawn(
|
||||
f'mmgen-{op}',
|
||||
(opts or self.user_opts)
|
||||
|
|
@ -921,6 +935,10 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|||
if '--verbose' in add_opts:
|
||||
t.expect('view: ', 't')
|
||||
elif op == 'txcreate':
|
||||
al = AddrIdxList(fmt_str=self.users[self.user].kal_range)
|
||||
for n in range(len(al)):
|
||||
t.expect('Loading')
|
||||
t.expect('Opening')
|
||||
if sweep_type:
|
||||
t.expect(self.menu_prompt, menu)
|
||||
for ch in sweep_menu:
|
||||
|
|
@ -965,12 +983,12 @@ class CmdTestXMRCompatDev(CmdTestXMRCompat):
|
|||
('mine_initial_coins', 'mining initial coins'),
|
||||
('fund_user1', 'sending funds to user (wallet #1)'),
|
||||
('check_bal_alice', 'mining, checking balance'),
|
||||
# ('user_txcreate1', 'creating a transaction'),
|
||||
('user_txcreate_sweep1', 'creating a sweep transaction'),
|
||||
('user_txcreate1', 'creating a transaction'),
|
||||
# ('user_txcreate_sweep1', 'creating a sweep transaction'),
|
||||
('wait_loop_start_xmr', 'starting autosign wait loop in XMR compat mode [--coins=xmr]'),
|
||||
# ('wait_signed1', 'autosigning the transaction'),
|
||||
('user_txsend1', 'sending the transaction'),
|
||||
('user_gettxdata', 'getting transaction data'),
|
||||
('wait_signed1', 'autosigning the transaction'),
|
||||
# ('user_txsend1', 'sending the transaction'),
|
||||
# ('user_gettxdata', 'getting transaction data'),
|
||||
# ('user_listaddresses_refresh', 'refreshing wallet'),
|
||||
('wait_loop_kill', 'stopping autosign wait loop'),
|
||||
('stop_daemons', 'stopping all wallet and coin daemons'))
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ class CmdTestXMRSwap(CmdTestXMRSwapMethods, CmdTestSwap):
|
|||
class CmdTestXMRSwapXMR(CmdTestXMRSwapMethods, CmdTestSwapMethods, CmdTestXMRCompat):
|
||||
'Monero swap operations - Monero wallet'
|
||||
networks = ('xmr',)
|
||||
extra_daemons = ()
|
||||
tmpdir_nums = [77]
|
||||
is_helper = True
|
||||
tx_relay_user = None
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ sec = 'deadbeef' * 8
|
|||
|
||||
class unit_tests:
|
||||
|
||||
altcoin_deps = ('monero_python', 'keyconv', 'zcash_mini', 'eth_keys', 'ssh_socks_proxy')
|
||||
altcoin_deps = (
|
||||
'monero_python',
|
||||
'keyconv',
|
||||
'zcash_mini',
|
||||
'eth_keys',
|
||||
'ssh_socks_proxy')
|
||||
|
||||
win_skip = ('losetup', 'zcash_mini', 'sudo')
|
||||
mac_skip = ('losetup',)
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ init_tests() {
|
|||
"
|
||||
|
||||
[ "$SOC" ] && xmr_env=(
|
||||
"MMGEN_TEST_SUITE_PEXPECT_TIMEOUT=${MMGEN_TEST_SUITE_PEXPECT_TIMEOUT:-600}"
|
||||
"MMGEN_TEST_SUITE_PEXPECT_TIMEOUT=${MMGEN_TEST_SUITE_PEXPECT_TIMEOUT:-1800}"
|
||||
"MMGEN_HTTP_TIMEOUT=${MMGEN_HTTP_TIMEOUT:-600}"
|
||||
"MMGEN_DAEMON_STATE_TIMEOUT=${MMGEN_DAEMON_STATE_TIMEOUT:-300}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue