Prolonged Proxy timeout

Added support for multiple test chains
This commit is contained in:
SirSevenG
2019-08-02 03:05:47 +07:00
parent 07bb419492
commit 7a4f8b3401
2 changed files with 73 additions and 24 deletions

View File

@@ -21,6 +21,24 @@ if operating_system != 'Win64' and operating_system != 'Windows':
import readline
class CustomProxy(Proxy):
def __init__(self,
service_url=None,
service_port=None,
conf_file=None,
timeout=3000):
config = dict()
if conf_file:
config = slickrpc.ConfigObj(conf_file)
if service_url:
config.update(self.url_to_conf(service_url))
if service_port:
config.update(rpcport=service_port)
elif not config.get('rpcport'):
config['rpcport'] = 7771
self.conn = self.prepare_connection(config, timeout=timeout)
def colorize(string, color):
colors = {
@@ -97,7 +115,7 @@ def def_credentials(chain):
print("check "+coin_config_file)
exit(1)
return(Proxy("http://%s:%s@127.0.0.1:%d"%(rpcuser, rpcpassword, int(rpcport))))
return(CustomProxy("http://%s:%s@127.0.0.1:%d"%(rpcuser, rpcpassword, int(rpcport))))
def getinfo_tui(rpc_connection):