mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-19 03:20:37 +00:00
[qa]: add parsing for '<host>:<port>' argument form to rpc_url()
Github-Pull: #8400 Rebased-From: 0ff4375c93bd159233282de5a33ad2e6c1e79841
This commit is contained in:
parent
69d1cd202d
commit
e111904a76
@ -171,7 +171,15 @@ def rpc_auth_pair(n):
|
||||
|
||||
def rpc_url(i, rpchost=None):
|
||||
rpc_u, rpc_p = rpc_auth_pair(i)
|
||||
return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, rpchost or '127.0.0.1', rpc_port(i))
|
||||
host = '127.0.0.1'
|
||||
port = rpc_port(i)
|
||||
if rpchost:
|
||||
parts = rpchost.split(':')
|
||||
if len(parts) == 2:
|
||||
host, port = parts
|
||||
else:
|
||||
host = rpchost
|
||||
return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, host, int(port))
|
||||
|
||||
def wait_for_bitcoind_start(process, url, i):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user