mmgen-tool: Monero wallet ops fix

This commit is contained in:
The MMGen Project 2020-06-12 11:59:30 +00:00
commit 5be132a84c
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 5 additions and 2 deletions

View file

@ -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 = {}

View file

@ -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

View file

@ -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: