Skip to content

Commit

Permalink
tests: Delete unused function _rpchost_to_args
Browse files Browse the repository at this point in the history
This function has been unused ever since the RPC tests no longer use
`bitcoin-cli`.

Cherry-picked from: 99fecf8
  • Loading branch information
laanwj authored and xanimo committed Jul 10, 2024
1 parent 3126f2a commit ee1230f
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions qa/rpc-tests/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,27 +311,7 @@ def initialize_chain_clean(test_dir, num_nodes):
datadir=initialize_datadir(test_dir, i)


def _rpchost_to_args(rpchost):
'''Convert optional IP:port spec to rpcconnect/rpcport args'''
if rpchost is None:
return []

match = re.match('(\[[0-9a-fA-f:]+\]|[^:]+)(?::([0-9]+))?$', rpchost)
if not match:
raise ValueError('Invalid RPC host spec ' + rpchost)

rpcconnect = match.group(1)
rpcport = match.group(2)

if rpcconnect.startswith('['): # remove IPv6 [...] wrapping
rpcconnect = rpcconnect[1:-1]

rv = ['-rpcconnect=' + rpcconnect]
if rpcport:
rv += ['-rpcport=' + rpcport]
return rv

def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None):
def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None, stderr=None):
"""
Start a dogecoind and return RPC connection to it
"""
Expand Down

0 comments on commit ee1230f

Please sign in to comment.