Reduce Decred log level and consider wallet blocks for verificationprogress.

master^2
tecnovert 7 months ago
parent b07bc3c456
commit e62e9eb0bf
  1. 11
      basicswap/interface/dcr/dcr.py
  2. 4
      bin/basicswap_prepare.py

@ -378,7 +378,16 @@ class DCRInterface(Secp256k1Interface):
return self.rpc('getnetworkinfo')['version']
def getBlockchainInfo(self):
return self.rpc('getblockchaininfo')
bci = self.rpc('getblockchaininfo')
# Adjust verificationprogress to consider blocks wallet has synced
wallet_blocks = self.rpc_wallet('getinfo')['blocks']
synced_ind = bci['verificationprogress']
wallet_synced_ind = wallet_blocks / bci['headers']
if wallet_synced_ind < synced_ind:
bci['verificationprogress'] = wallet_synced_ind
return bci
def getWalletInfo(self):
rv = {}

@ -931,7 +931,7 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic, extra_opts={}):
with open(core_conf_path, 'w') as fp:
if chain != 'mainnet':
fp.write(chainname + '=1\n')
fp.write('debuglevel=debug\n')
fp.write('debuglevel=info\n')
fp.write('notls=1\n')
fp.write('rpclisten={}:{}\n'.format(core_settings['rpchost'], core_settings['rpcport']))
@ -948,7 +948,7 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic, extra_opts={}):
with open(wallet_conf_path, 'w') as fp:
if chain != 'mainnet':
fp.write(chainname + '=1\n')
fp.write('debuglevel=debug\n')
fp.write('debuglevel=info\n')
fp.write('noservertls=1\n')
fp.write('noclienttls=1\n')

Loading…
Cancel
Save