Make the REGTEST AC special in our test suite, so we get a predictable rpc port number
This commit is contained in:
@@ -26,10 +26,11 @@ class CryptoConditionsTest (BitcoinTestFramework):
|
|||||||
self.privkey = "UqMgxk7ySPNQ4r9nKAFPjkXy6r5t898yhuNCjSZJLg3RAM4WW1m9"
|
self.privkey = "UqMgxk7ySPNQ4r9nKAFPjkXy6r5t898yhuNCjSZJLg3RAM4WW1m9"
|
||||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
|
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
|
||||||
extra_args=[[
|
extra_args=[[
|
||||||
|
# always give -ac_name as first extra_arg
|
||||||
|
'-ac_name=REGTEST',
|
||||||
'-conf='+self.options.tmpdir+'/node0/REGTEST.conf',
|
'-conf='+self.options.tmpdir+'/node0/REGTEST.conf',
|
||||||
'-port=64367',
|
'-port=64367',
|
||||||
'-rpcport=64368',
|
'-rpcport=64368',
|
||||||
'-ac_name=REGTEST',
|
|
||||||
'-regtest',
|
'-regtest',
|
||||||
'-addressindex=1',
|
'-addressindex=1',
|
||||||
'-spentindex=1',
|
'-spentindex=1',
|
||||||
|
|||||||
@@ -223,9 +223,10 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
|
|||||||
if os.getenv("PYTHON_DEBUG", ""):
|
if os.getenv("PYTHON_DEBUG", ""):
|
||||||
print "start_node: calling komodo-cli -rpcwait getblockcount returned"
|
print "start_node: calling komodo-cli -rpcwait getblockcount returned"
|
||||||
devnull.close()
|
devnull.close()
|
||||||
#url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i))
|
if extra_args[0] == '-ac_name=REGTEST':
|
||||||
#TODO: this breaks non CC tests
|
url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', 64368)
|
||||||
url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', 64368)
|
else:
|
||||||
|
url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i))
|
||||||
print("connecting to " + url)
|
print("connecting to " + url)
|
||||||
if timewait is not None:
|
if timewait is not None:
|
||||||
proxy = AuthServiceProxy(url, timeout=timewait)
|
proxy = AuthServiceProxy(url, timeout=timewait)
|
||||||
|
|||||||
Reference in New Issue
Block a user