Skip to content

Commit 99fecf8

Browse files
committed
tests: Delete unused function _rpchost_to_args
This function has been unused ever since the RPC tests no longer use `bitcoin-cli`.
1 parent 8a3b075 commit 99fecf8

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)