From 5be132a84cfdb59e933bc882645ad1672468ef4a Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 12 Jun 2020 11:59:30 +0000 Subject: [PATCH] mmgen-tool: Monero wallet ops fix --- mmgen/protocol.py | 2 ++ mmgen/rpc.py | 1 + mmgen/tool.py | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mmgen/protocol.py b/mmgen/protocol.py index a3e683a7..fdc141ec 100755 --- a/mmgen/protocol.py +++ b/mmgen/protocol.py @@ -482,6 +482,8 @@ class CoinProtocol(MMGenObject): # https://github.com/monero-project/monero/blob/master/src/cryptonote_config.h class Monero(DummyWIF,Base): base_coin = 'XMR' + daemon_data_dir = ( os.path.join('/','c','ProgramData','bitmonero') if g.platform == 'win' else + os.path.join(g.home_dir,'.bitmonero') ) addr_ver_bytes = { '12': 'monero', '2a': 'monero_sub' } addr_len = 68 wif_ver_num = {} diff --git a/mmgen/rpc.py b/mmgen/rpc.py index 52721345..65f231f9 100755 --- a/mmgen/rpc.py +++ b/mmgen/rpc.py @@ -558,6 +558,7 @@ class MoneroWalletRPCClient(RPCClient): def __init__(self,host,port,user,passwd): super().__init__(host,port) self.auth = auth_data(user,passwd) + self.timeout = 3600 # allow enough time to sync ≈1,000,000 blocks if True: self.set_backend('requests') else: # insecure, for debugging only diff --git a/mmgen/tool.py b/mmgen/tool.py index c1c9d21a..77831648 100755 --- a/mmgen/tool.py +++ b/mmgen/tool.py @@ -1076,9 +1076,9 @@ class MMGenToolCmdMonero(MMGenToolCmds): password=d.wallet_passwd ) msg('done') - msg_r(' Getting wallet height...') + msg_r(' Getting wallet height (be patient, this could take a long time)...') wallet_height = (await c.call('get_height'))['height'] - msg('\r Wallet height: {} '.format(wallet_height)) + msg('\r{}\r Wallet height: {} '.format(' '*68,wallet_height)) behind = chain_height - wallet_height if behind > 1000: