Reduce Decred log level and consider wallet blocks for verificationprogress.
This commit is contained in:
		
							parent
							
								
									b07bc3c456
								
							
						
					
					
						commit
						e62e9eb0bf
					
				@ -378,7 +378,16 @@ class DCRInterface(Secp256k1Interface):
 | 
				
			|||||||
        return self.rpc('getnetworkinfo')['version']
 | 
					        return self.rpc('getnetworkinfo')['version']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def getBlockchainInfo(self):
 | 
					    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):
 | 
					    def getWalletInfo(self):
 | 
				
			||||||
        rv = {}
 | 
					        rv = {}
 | 
				
			||||||
 | 
				
			|||||||
@ -931,7 +931,7 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic, extra_opts={}):
 | 
				
			|||||||
        with open(core_conf_path, 'w') as fp:
 | 
					        with open(core_conf_path, 'w') as fp:
 | 
				
			||||||
            if chain != 'mainnet':
 | 
					            if chain != 'mainnet':
 | 
				
			||||||
                fp.write(chainname + '=1\n')
 | 
					                fp.write(chainname + '=1\n')
 | 
				
			||||||
            fp.write('debuglevel=debug\n')
 | 
					            fp.write('debuglevel=info\n')
 | 
				
			||||||
            fp.write('notls=1\n')
 | 
					            fp.write('notls=1\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            fp.write('rpclisten={}:{}\n'.format(core_settings['rpchost'], core_settings['rpcport']))
 | 
					            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:
 | 
					        with open(wallet_conf_path, 'w') as fp:
 | 
				
			||||||
            if chain != 'mainnet':
 | 
					            if chain != 'mainnet':
 | 
				
			||||||
                fp.write(chainname + '=1\n')
 | 
					                fp.write(chainname + '=1\n')
 | 
				
			||||||
            fp.write('debuglevel=debug\n')
 | 
					            fp.write('debuglevel=info\n')
 | 
				
			||||||
            fp.write('noservertls=1\n')
 | 
					            fp.write('noservertls=1\n')
 | 
				
			||||||
            fp.write('noclienttls=1\n')
 | 
					            fp.write('noclienttls=1\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user