mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
Reduce Decred log level and consider wallet blocks for verificationprogress.
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user