mirror of
https://github.com/basicswap/basicswap.git
synced 2024-11-16 07:47:48 +00:00
Reduce Decred log level and consider wallet blocks for verificationprogress.
This commit is contained in:
parent
b07bc3c456
commit
e62e9eb0bf
2 changed files with 12 additions and 3 deletions
|
@ -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…
Reference in a new issue