|
@@ -536,7 +536,7 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
('mine_blocks_1', 'mining a block'),
|
|
('mine_blocks_1', 'mining a block'),
|
|
|
('fund_alice_sub3', 'sending funds to Alice’s subaddress #3 (wallet #2)'),
|
|
('fund_alice_sub3', 'sending funds to Alice’s subaddress #3 (wallet #2)'),
|
|
|
('alice_twview2', 'viewing Alice’s tracking wallets (reload, sort options)'),
|
|
('alice_twview2', 'viewing Alice’s tracking wallets (reload, sort options)'),
|
|
|
- ('alice_twview3', 'viewing Alice’s tracking wallets (check balances)'),
|
|
|
|
|
|
|
+ ('alice_twview_chk1', 'viewing Alice’s tracking wallets (check balances)'),
|
|
|
('alice_listaddresses_sort', 'listing Alice’s addresses (sort options)'),
|
|
('alice_listaddresses_sort', 'listing Alice’s addresses (sort options)'),
|
|
|
('wait_loop_start_compat', 'starting autosign wait loop in XMR compat mode [--coins=xmr]'),
|
|
('wait_loop_start_compat', 'starting autosign wait loop in XMR compat mode [--coins=xmr]'),
|
|
|
('alice_txcreate1', 'creating a transaction'),
|
|
('alice_txcreate1', 'creating a transaction'),
|
|
@@ -548,6 +548,16 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
('alice_txcreate3', 'recreating the transaction'),
|
|
('alice_txcreate3', 'recreating the transaction'),
|
|
|
('wait_loop_start_ltc', 'starting autosign wait loop in XMR compat mode [--coins=ltc,xmr]'),
|
|
('wait_loop_start_ltc', 'starting autosign wait loop in XMR compat mode [--coins=ltc,xmr]'),
|
|
|
('alice_txsend1', 'sending the transaction'),
|
|
('alice_txsend1', 'sending the transaction'),
|
|
|
|
|
+ ('mine_blocks_10', 'mining some blocks'),
|
|
|
|
|
+ ('alice_twview_chk2', 'viewing Alice’s tracking wallets (check balances)'),
|
|
|
|
|
+ ('alice_txcreate_sweep1', 'creating a sweep transaction (account sweep)'),
|
|
|
|
|
+ ('alice_txsend2', 'sending the transaction'),
|
|
|
|
|
+ ('mine_blocks_10', 'mining some blocks'),
|
|
|
|
|
+ ('alice_twview_chk3', 'viewing Alice’s tracking wallets (check balances)'),
|
|
|
|
|
+ ('alice_txcreate_sweep2', 'creating a sweep transaction (address sweep)'),
|
|
|
|
|
+ ('alice_txsend3', 'sending the transaction'),
|
|
|
|
|
+ ('mine_blocks_10', 'mining some blocks'),
|
|
|
|
|
+ ('alice_twview_chk4', 'viewing Alice’s tracking wallets (check balances)'),
|
|
|
('wait_loop_kill', 'stopping autosign wait loop'),
|
|
('wait_loop_kill', 'stopping autosign wait loop'),
|
|
|
('alice_newacct1', 'adding account to Alice’s tracking wallet (dfl label)'),
|
|
('alice_newacct1', 'adding account to Alice’s tracking wallet (dfl label)'),
|
|
|
('alice_newacct2', 'adding account to Alice’s tracking wallet (no timestr)'),
|
|
('alice_newacct2', 'adding account to Alice’s tracking wallet (no timestr)'),
|
|
@@ -680,14 +690,27 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
def alice_twview2(self):
|
|
def alice_twview2(self):
|
|
|
return self._alice_twops('twview', menu='RaAdMraAdMe')
|
|
return self._alice_twops('twview', menu='RaAdMraAdMe')
|
|
|
|
|
|
|
|
- def alice_twview3(self):
|
|
|
|
|
|
|
+ def alice_twview_chk1(self):
|
|
|
|
|
+ return self._alice_twview_chk([
|
|
|
|
|
+ 'Total XMR: 3.722345649021 [3.729999970119]',
|
|
|
|
|
+ '1 0.026296296417',
|
|
|
|
|
+ '0.007654321098'])
|
|
|
|
|
+
|
|
|
|
|
+ def alice_twview_chk2(self):
|
|
|
|
|
+ return self._alice_twview_chk(['Total XMR: 3.715053370119'], sync=True)
|
|
|
|
|
+
|
|
|
|
|
+ def alice_twview_chk3(self):
|
|
|
|
|
+ return self._alice_twview_chk(['Total XMR: 3.713242570119', '1.232757091234'], sync=True)
|
|
|
|
|
+
|
|
|
|
|
+ def alice_twview_chk4(self):
|
|
|
|
|
+ return self._alice_twview_chk(['Total XMR: 3.709050970119', '1.254861787651'], sync=True)
|
|
|
|
|
+
|
|
|
|
|
+ def _alice_twview_chk(self, expect_arr, sync=False):
|
|
|
return self._alice_twops(
|
|
return self._alice_twops(
|
|
|
'twview',
|
|
'twview',
|
|
|
- interactive = False,
|
|
|
|
|
- expect_arr = [
|
|
|
|
|
- 'Total XMR: 3.722345649021 [3.729999970119]',
|
|
|
|
|
- '1 0.026296296417',
|
|
|
|
|
- '0.007654321098'])
|
|
|
|
|
|
|
+ interactive = sync,
|
|
|
|
|
+ menu = 'R' if sync else '',
|
|
|
|
|
+ expect_arr = expect_arr)
|
|
|
|
|
|
|
|
def _alice_twops(
|
|
def _alice_twops(
|
|
|
self,
|
|
self,
|
|
@@ -721,7 +744,7 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
t.expect('main menu): ', str(lbl_addr_idx))
|
|
t.expect('main menu): ', str(lbl_addr_idx))
|
|
|
elif newacct_wallet_num:
|
|
elif newacct_wallet_num:
|
|
|
t.expect(menu_prompt, 'N')
|
|
t.expect(menu_prompt, 'N')
|
|
|
- t.expect('number> ', f'{newacct_wallet_num}\n')
|
|
|
|
|
|
|
+ t.expect('number, or ENTER to return to main menu> ', f'{newacct_wallet_num}\n')
|
|
|
elif newaddr_acct_num:
|
|
elif newaddr_acct_num:
|
|
|
t.expect(menu_prompt, 'n')
|
|
t.expect(menu_prompt, 'n')
|
|
|
t.expect('main menu): ', str(newaddr_acct_num))
|
|
t.expect('main menu): ', str(newaddr_acct_num))
|
|
@@ -752,21 +775,28 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
def alice_txcreate1(self):
|
|
def alice_txcreate1(self):
|
|
|
return self._alice_txops('txcreate', [f'{self.burn_addr},0.012345'], acct_num=1)
|
|
return self._alice_txops('txcreate', [f'{self.burn_addr},0.012345'], acct_num=1)
|
|
|
|
|
|
|
|
|
|
+ def alice_txcreate_sweep1(self):
|
|
|
|
|
+ return self._alice_txops('txcreate', menu='S', sweep_menu='23', sweep_type='sweep')
|
|
|
|
|
+
|
|
|
|
|
+ def alice_txcreate_sweep2(self):
|
|
|
|
|
+ return self._alice_txops('txcreate', menu='s', sweep_menu='2', sweep_type='sweep_all')
|
|
|
|
|
+
|
|
|
alice_txcreate3 = alice_txcreate2 = alice_txcreate1
|
|
alice_txcreate3 = alice_txcreate2 = alice_txcreate1
|
|
|
|
|
|
|
|
- def alice_txabort1(self):
|
|
|
|
|
|
|
+ def _alice_txabort(self):
|
|
|
return self._alice_txops('txsend', opts=['--alice', '--abort'])
|
|
return self._alice_txops('txsend', opts=['--alice', '--abort'])
|
|
|
|
|
|
|
|
- alice_txabort2 = alice_txabort1
|
|
|
|
|
|
|
+ alice_txabort1 = alice_txabort2 = _alice_txabort
|
|
|
|
|
|
|
|
- def alice_txsend1(self):
|
|
|
|
|
|
|
+ def _alice_txsend(self):
|
|
|
return self._alice_txops(
|
|
return self._alice_txops(
|
|
|
'txsend',
|
|
'txsend',
|
|
|
opts = ['--alice', '--quiet'],
|
|
opts = ['--alice', '--quiet'],
|
|
|
add_opts = self.alice_daemon_opts,
|
|
add_opts = self.alice_daemon_opts,
|
|
|
- acct_num = 1,
|
|
|
|
|
wait_signed = True)
|
|
wait_signed = True)
|
|
|
|
|
|
|
|
|
|
+ alice_txsend1 = alice_txsend2 = alice_txsend3 = _alice_txsend
|
|
|
|
|
+
|
|
|
def wait_signed1(self):
|
|
def wait_signed1(self):
|
|
|
self.spawn(msg_only=True)
|
|
self.spawn(msg_only=True)
|
|
|
oqmsg('')
|
|
oqmsg('')
|
|
@@ -783,6 +813,8 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
menu = '',
|
|
menu = '',
|
|
|
acct_num = None,
|
|
acct_num = None,
|
|
|
wait_signed = False,
|
|
wait_signed = False,
|
|
|
|
|
+ sweep_type = None,
|
|
|
|
|
+ sweep_menu = '',
|
|
|
signable_desc = 'transaction'):
|
|
signable_desc = 'transaction'):
|
|
|
if wait_signed:
|
|
if wait_signed:
|
|
|
self._wait_signed(signable_desc)
|
|
self._wait_signed(signable_desc)
|
|
@@ -791,9 +823,16 @@ class CmdTestXMRCompat(CmdTestXMRAutosign):
|
|
|
if '--abort' in opts:
|
|
if '--abort' in opts:
|
|
|
t.expect('(y/N): ', 'y')
|
|
t.expect('(y/N): ', 'y')
|
|
|
elif op == 'txcreate':
|
|
elif op == 'txcreate':
|
|
|
- for ch in menu + 'q':
|
|
|
|
|
- t.expect(self.menu_prompt, ch)
|
|
|
|
|
- t.expect('to spend from: ', f'{acct_num}\n')
|
|
|
|
|
|
|
+ if sweep_type:
|
|
|
|
|
+ t.expect(self.menu_prompt, menu)
|
|
|
|
|
+ for ch in sweep_menu:
|
|
|
|
|
+ t.expect('main menu): ', ch)
|
|
|
|
|
+ t.expect('number> ', {'sweep': '1', 'sweep_all': '2'}[sweep_type])
|
|
|
|
|
+ t.expect('(y/N): ', 'y') # create new address?
|
|
|
|
|
+ else:
|
|
|
|
|
+ for ch in menu + 'q':
|
|
|
|
|
+ t.expect(self.menu_prompt, ch)
|
|
|
|
|
+ t.expect('to spend from: ', f'{acct_num}\n')
|
|
|
t.expect('(y/N): ', 'y') # save?
|
|
t.expect('(y/N): ', 'y') # save?
|
|
|
elif op == 'txsend':
|
|
elif op == 'txsend':
|
|
|
t.expect('(y/N): ', 'y') # view?
|
|
t.expect('(y/N): ', 'y') # view?
|