RPC ETH unit test: minor changes

This commit is contained in:
The MMGen Project 2021-07-29 14:20:44 +00:00
commit d9a58c7c55
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2

View file

@ -61,18 +61,27 @@ class init_test:
await rpc.call('eth_blockNumber',timeout=300)
def run_test(coin,auth):
proto = init_proto(coin,network=('mainnet','regtest')[coin=='eth']) # FIXME CoinDaemon's network handling broken
d = CoinDaemon(network_id=coin,test_suite=True)
d.stop()
d.remove_datadir()
d.start()
if not opt.no_daemon_stop:
d.stop()
if not opt.no_daemon_autostart:
d.remove_datadir()
d.start()
for backend in g.autoset_opts['rpc_backend'].choices:
run_session(getattr(init_test,coin)(proto,backend),backend=backend)
d.stop()
if not opt.no_daemon_stop:
d.stop()
if auth:
auth_test(proto,d)
qmsg(' OK')
return True