Browse Source

mmgen-xmrwallet: --do-not-relay -> --no-relay

Note that the old form of the option is no longer valid, so shell scripts may
have to be updated.
The MMGen Project 2 years ago
parent
commit
70762c0f56
4 changed files with 15 additions and 15 deletions
  1. 1 1
      mmgen/data/version
  2. 6 6
      mmgen/main_xmrwallet.py
  3. 3 3
      mmgen/xmrwallet.py
  4. 5 5
      test/test_py_d/ts_xmrwallet.py

+ 1 - 1
mmgen/data/version

@@ -1 +1 @@
-13.3.dev2
+13.3.dev3

+ 6 - 6
mmgen/main_xmrwallet.py

@@ -51,7 +51,7 @@ opts_data = {
 -p, --hash-preset=P              Use scrypt hash preset 'P' for password
                                  hashing (default: '{g.dfl_hash_preset}')
 -r, --restore-height=H           Scan from height 'H' when creating wallets
--R, --do-not-relay               Save transaction to file instead of relaying
+-R, --no-relay                   Save transaction to file instead of relaying
 -s, --no-start-wallet-daemon     Don’t start the wallet daemon at startup
 -S, --no-stop-wallet-daemon      Don’t stop the wallet daemon at exit
 -w, --wallet-dir=D               Output or operate on wallets in directory 'D'
@@ -85,7 +85,7 @@ transfer  - transfer specified XMR amount from specified wallet:account to
 sweep     - sweep funds in specified wallet:account to new address in same
             account or new account in another wallet
 relay     - relay a transaction from a transaction file created using 'sweep'
-            or 'transfer' with the --do-not-relay option
+            or 'transfer' with the --no-relay option
 
 
                  'CREATE', 'SYNC' AND 'LIST' OPERATION NOTES
@@ -149,7 +149,7 @@ via optional SOCKS proxy, use the --tx-relay-daemon option described above.
                                   WARNING
 
 To avoid exposing your private keys on a network-connected machine, you’re
-strongly advised to create all transactions offline using the --do-not-relay
+strongly advised to create all transactions offline using the --no-relay
 option.  For this, a monerod with a fully synced blockchain must be running
 on the offline machine.  The resulting transaction files are then sent using
 the 'relay' operation.
@@ -180,7 +180,7 @@ $ mmgen-xmrwallet transfer *.akeys.mmenc 2:0:<monero address>,0.1
 
 Sweep all funds from account #0 of wallet 2 to a new address, saving the
 transaction to a file:
-$ mmgen-xmrwallet --do-not-relay sweep *.akeys.mmenc 2:0
+$ mmgen-xmrwallet --no-relay sweep *.akeys.mmenc 2:0
 
 Relay the created sweep transaction via a host on the Tor network:
 $ mmgen-xmrwallet --tx-relay-daemon=abcdefghijklmnop.onion:127.0.0.1:9050 relay *XMR*.sigtx
@@ -235,7 +235,7 @@ uo = namedtuple('uopts',[
 	'rescan_blockchain',
 	'no_start_wallet_daemon',
 	'no_stop_wallet_daemon',
-	'do_not_relay',
+	'no_relay',
 	'wallet_dir',
 ])
 
@@ -247,7 +247,7 @@ uopts = uo(
 	opt.rescan_blockchain,
 	opt.no_start_wallet_daemon,
 	opt.no_stop_wallet_daemon,
-	opt.do_not_relay,
+	opt.no_relay,
 	opt.wallet_dir,
 )
 

+ 3 - 3
mmgen/xmrwallet.py

@@ -240,7 +240,7 @@ class MoneroWalletOps:
 		'restore_height',
 		'no_start_wallet_daemon',
 		'no_stop_wallet_daemon',
-		'do_not_relay',
+		'no_relay',
 	)
 	pat_opts = ('daemon','tx_relay_daemon')
 
@@ -738,7 +738,7 @@ class MoneroWalletOps:
 		name     = 'sweep'
 		spec_id  = 'sweep_spec'
 		spec_key = ( (1,'source'), (3,'dest') )
-		opts     = ('do_not_relay','tx_relay_daemon')
+		opts     = ('no_relay','tx_relay_daemon')
 
 		def create_addr_data(self):
 			m = re.fullmatch(uarg_info[self.spec_id].pat,uarg.spec,re.ASCII)
@@ -852,7 +852,7 @@ class MoneroWalletOps:
 			if uopt.tx_relay_daemon:
 				self.display_tx_relay_info(indent='    ')
 
-			if uopt.do_not_relay:
+			if uopt.no_relay:
 				msg('Saving TX data to file')
 				new_tx.write(delete_metadata=True)
 			elif keypress_confirm(f'Relay {self.name} transaction?'):

+ 5 - 5
test/test_py_d/ts_xmrwallet.py

@@ -399,7 +399,7 @@ class TestSuiteXMRWallet(TestSuiteBase):
 
 	def do_op(self, op, user, arg2,
 			tx_relay_parm = None,
-			do_not_relay  = False,
+			no_relay      = False,
 			return_amt    = False,
 			reuse_acct    = False,
 			add_desc      = None,
@@ -411,7 +411,7 @@ class TestSuiteXMRWallet(TestSuiteBase):
 			[f'--outdir={data.udir}'],
 			[f'--daemon=localhost:{data.md.rpc_port}'],
 			[f'--tx-relay-daemon={tx_relay_parm}', tx_relay_parm],
-			['--do-not-relay', do_not_relay]
+			['--no-relay', no_relay]
 		)
 		add_desc = (', ' + add_desc) if add_desc else ''
 
@@ -431,7 +431,7 @@ class TestSuiteXMRWallet(TestSuiteBase):
 		if return_amt:
 			amt = XMRAmt(strip_ansi_escapes(t.expect_getend('Amt: ')).replace('XMR','').strip())
 
-		if do_not_relay:
+		if no_relay:
 			t.expect('Save MoneroMMGenTX data? (y/N): ','y')
 			t.written_to_file('MoneroMMGenTX data')
 		else:
@@ -473,7 +473,7 @@ class TestSuiteXMRWallet(TestSuiteBase):
 	def transfer_to_miner_create(self,amt):
 		get_file_with_ext(self.users['alice'].udir,'sigtx',delete_all=True)
 		addr = read_from_file(self.users['miner'].addrfile_fs.format(2))
-		return self.do_op('transfer','alice',f'2:1:{addr},{amt}',do_not_relay=True,do_ret=True)
+		return self.do_op('transfer','alice',f'2:1:{addr},{amt}',no_relay=True,do_ret=True)
 
 	def transfer_to_miner_create1(self):
 		return self.transfer_to_miner_create('0.0111')
@@ -517,7 +517,7 @@ class TestSuiteXMRWallet(TestSuiteBase):
 			get_file_with_ext(self.users['alice'].udir,'sigtx',delete_all=True)
 			send_amt = self.do_op(
 				'sweep','alice','2:1,3', # '2:1,3'
-				do_not_relay = True,
+				no_relay     = True,
 				reuse_acct   = True,
 				add_desc     = f'TX #{i+1}',
 				return_amt   = True )