whitespace, minor cleanups

This commit is contained in:
The MMGen Project 2026-09-21 10:30:52 +00:00
commit c6a207c13d
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
5 changed files with 16 additions and 19 deletions

View file

@ -30,6 +30,7 @@ class monero_daemon(CoinDaemon):
'linux': [gc.home_dir, '.bitmonero'],
'darwin': [gc.home_dir, '.bitmonero'],
'win32': ['/', 'c', 'ProgramData', 'bitmonero']}
use_pidfile = gc.platform == 'linux'
def get_p2p_port(self):
return self.rpc_port - 1
@ -47,8 +48,6 @@ class monero_daemon(CoinDaemon):
test_connection = False,
daemon = self)
self.use_pidfile = gc.platform == 'linux'
self.shared_args = list_gen(
['--no-zmq'],
[f'--p2p-bind-port={self.p2p_port}', self.p2p_port],
@ -81,6 +80,7 @@ class MoneroWalletDaemon(RPCDaemon):
new_console_mswin = True
networks = ('mainnet', 'testnet')
rpc_ports = _nw(13131, 13141, None) # testnet is non-standard
use_pidfile = gc.platform == 'linux'
_reset_ok = ('debug', 'wait', 'pids', 'force_kill')
test_user_port_shifts = {
'bob': 10,
@ -124,11 +124,10 @@ class MoneroWalletDaemon(RPCDaemon):
self.wallet_dir = MoneroTwCtl.get_tw_dir(self.proto)
fn_stem = f'{self.exec_fn}-{self.bind_port}'
self.pidfile = self.proto.network_datadir / (fn_stem + '.pid')
if self.use_pidfile:
self.pidfile = self.proto.network_datadir / (fn_stem + '.pid')
self.logfile = self.proto.network_datadir / (fn_stem + '.log')
self.use_pidfile = gc.platform == 'linux'
self.proxy = proxy
self.monerod_addr = monerod_addr
self.monerod_port = (

View file

@ -145,12 +145,11 @@ class CmdTestSwapMethods:
def _swaptxsend1(self, *, add_opts=[], spawn_only=False):
return self._swaptxsend(
add_opts = add_opts + [
# test overriding host:port with coin-specific options:
'--rpc-host=unreachable', # unreachable host
'--ltc-rpc-host=localhost',
'--rpc-port=46381', # bad port
'--ltc-rpc-port=20680',
],
# test overriding host:port with coin-specific options:
'--rpc-host=unreachable', # unreachable host
'--ltc-rpc-host=localhost',
'--rpc-port=46381', # bad port
'--ltc-rpc-port=20680'],
spawn_only = spawn_only)
def _swaptxsend(self, *, add_opts=[], spawn_only=False, status=False, dump_hex=False):

View file

@ -45,8 +45,8 @@ class CmdTestXMRAutosign(CmdTestXMRWallet, CmdTestAutosignThreaded):
# xmrwallet attrs:
tx_relay_user = 'miner'
# user sid autosign port_shift kal_range add_coind_args
user_data = (
# user sid autosign port_shift kal_range add_coind_args
('miner', '98831F3A', False, 130, '1', []),
('alice', 'FE3C6545', True, 150, '1-2', []))

View file

@ -20,7 +20,8 @@
test.cmdtest_d.xmrwallet: xmrwallet tests for the cmdtest.py test suite
"""
import os, time, re, atexit, asyncio, shutil
import os
import time, re, atexit, asyncio, shutil
from subprocess import run
from collections import namedtuple
@ -67,12 +68,11 @@ class CmdTestXMRWallet(CmdTestBase):
tmpdir_nums = [29]
dfl_random_txs = 3
color = True
# Bob’s daemon is stopped via process kill, not RPC, so put Bob last in list:
# user sid autosign port_shift kal_range add_coind_args
user_data = (
# user sid autosign port_shift kal_range add_coind_args
('miner', '98831F3A', False, 130, '1-2', []),
('alice', 'FE3C6545', False, 150, '1-4', []),
('bob', '1378FC64', False, 140, None, ['--restricted-rpc']))
('bob', '1378FC64', False, 140, None, ['--restricted-rpc']),
('alice', 'FE3C6545', False, 150, '1-4', []))
tx_relay_user = 'bob'
daemon_datadir_base = os.path.join('test', 'daemons', 'xmrtest')
compat = False

View file

@ -204,8 +204,7 @@ class unit_tests:
'rpc_port': 32323, # ignored
'btc_tw_name': 'ignored',
'tw_name': 'also-ignored',
'eth_testnet_chain_names': ['goerli', 'holesky', 'foo', 'bar', 'baz'],
})
'eth_testnet_chain_names': ['goerli', 'holesky', 'foo', 'bar', 'baz']})
def reth(self, name, ut):
return run_test(['eth', 'eth_rt'], daemon_ids=['reth']) # TODO: eth_tn