def on_btnTestConnection_clicked(self): if self.lstConns.currentRow() >= 0: cfg = self.local_config.dash_net_configs[ self.lstConns.currentRow()] dashd_intf = DashdInterface( self.config, window=self, connection=cfg) # we are testing a specific connection try: info = dashd_intf.getinfo() if info: if info.get('protocolversion'): self.infoMsg('Connection successful') else: self.errorMsg( 'Connect error. Details: empty return message') except Exception as e: self.errorMsg('Connect error. Details: ' + str(e)) finally: del dashd_intf
def on_btnTestConnection_clicked(self): if self.current_network_cfg: self.local_config.db_intf = self.app_config.db_intf dashd_intf = DashdInterface(window=self) dashd_intf.initialize(self.local_config, connection=self.current_network_cfg, for_testing_connections_only=True) try: info = dashd_intf.getinfo(verify_node=True) if info: try: ret = dashd_intf.rpc_call(True, False, "checkfeaturesupport", "enhanced_proxy") except Exception as e: ret = None if ret and type(ret) is dict: self.infoMsg( 'Connection successful.\n\n' 'Additional info: this node supports message encryption.' ) else: self.infoMsg('Connection successful.') else: self.errorMsg( 'Connection error. Details: empty return message.') except Exception as e: self.errorMsg('Connection error. Details: ' + str(e)) finally: del dashd_intf
def on_btnTestConnection_clicked(self): if self.current_network_cfg: self.local_config.db_intf = self.config.db_intf dashd_intf = DashdInterface(window=self) dashd_intf.initialize(self.local_config, connection=self.current_network_cfg, for_testing_connections_only=True) try: info = dashd_intf.getinfo(verify_node=True) if info: if info.get('protocolversion'): self.infoMsg('Connection successful') else: self.errorMsg( 'Connection error. Details: no \'protocolversion\' attibute in the reponse.' ) else: self.errorMsg( 'Connection error. Details: empty return message.') except Exception as e: self.errorMsg('Connection error. Details: ' + str(e)) finally: del dashd_intf