Skip to content

Commit d5ce14e

Browse files
committed
Merge #9929: tests: Delete unused function _rpchost_to_args
99fecf8 tests: Delete unused function _rpchost_to_args (Wladimir J. van der Laan) Tree-SHA512: 40911d048d3fd7b3ce83e9b3caf2a409d55b47cbe08ea4450a16ca72264300bb12d5ef7dbcf335885975119b5977f949e6879546840064138fb506e24494d849
2 parents c78adbf + 99fecf8 commit d5ce14e

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

qa/rpc-tests/test_framework/util.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -306,26 +306,6 @@ def initialize_chain_clean(test_dir, num_nodes):
306306
datadir=initialize_datadir(test_dir, i)
307307

308308

309-
def _rpchost_to_args(rpchost):
310-
'''Convert optional IP:port spec to rpcconnect/rpcport args'''
311-
if rpchost is None:
312-
return []
313-
314-
match = re.match('(\[[0-9a-fA-f:]+\]|[^:]+)(?::([0-9]+))?$', rpchost)
315-
if not match:
316-
raise ValueError('Invalid RPC host spec ' + rpchost)
317-
318-
rpcconnect = match.group(1)
319-
rpcport = match.group(2)
320-
321-
if rpcconnect.startswith('['): # remove IPv6 [...] wrapping
322-
rpcconnect = rpcconnect[1:-1]
323-
324-
rv = ['-rpcconnect=' + rpcconnect]
325-
if rpcport:
326-
rv += ['-rpcport=' + rpcport]
327-
return rv
328-
329309
def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None, stderr=None):
330310
"""
331311
Start a bitcoind and return RPC connection to it

0 commit comments

Comments
 (0)