Getting closer, invalid rpc user/pass instead of wrong port
This commit is contained in:
@@ -26,20 +26,24 @@ class CryptoConditionsTest (BitcoinTestFramework):
|
|||||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
|
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
|
||||||
extra_args=[[
|
extra_args=[[
|
||||||
'-regtest',
|
'-regtest',
|
||||||
'-server=1',
|
# TODO: AC.conf instead of komodo.conf
|
||||||
'-rpcport=64368',
|
#'-conf='+self.options.tmpdir+'/node0/komodo.conf',
|
||||||
'-conf='+self.options.tmpdir+'/node0/REGTEST.conf',
|
'-conf='+self.options.tmpdir+'/node0/REGTEST.conf',
|
||||||
|
'-port=64367',
|
||||||
|
'-rpcport=64368',
|
||||||
'-ac_name=REGTEST',
|
'-ac_name=REGTEST',
|
||||||
'-addressindex=1',
|
'-addressindex=1',
|
||||||
'-spentindex=1',
|
'-spentindex=1',
|
||||||
'-ac_supply=5555555',
|
'-ac_supply=5555555',
|
||||||
'-ac_reward=10000000',
|
'-ac_reward=10000000',
|
||||||
'-pubkey=02676d00110c2cd14ae24f95969e8598f7ccfaa675498b82654a5b5bd57fc1d8cf',
|
'-pubkey=02676d00110c2cd14ae24f95969e8598f7ccfaa675498b82654a5b5bd57fc1d8cf',
|
||||||
'-ac_cc=1'
|
'-ac_cc=1',
|
||||||
|
'-daemon',
|
||||||
]] * self.num_nodes
|
]] * self.num_nodes
|
||||||
)
|
)
|
||||||
self.is_network_split = split
|
self.is_network_split = split
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
print("Done setting up network")
|
||||||
|
|
||||||
def run_test (self):
|
def run_test (self):
|
||||||
print("Mining blocks...")
|
print("Mining blocks...")
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ def initialize_datadir(dirname, n):
|
|||||||
f.write("showmetrics=0\n");
|
f.write("showmetrics=0\n");
|
||||||
f.write("rpcuser=rt\n");
|
f.write("rpcuser=rt\n");
|
||||||
f.write("rpcpassword=rt\n");
|
f.write("rpcpassword=rt\n");
|
||||||
f.write("port="+str(p2p_port(n))+"\n");
|
#f.write("port="+str(p2p_port(n))+"\n");
|
||||||
rpcport = str(rpc_port(n))
|
#rpcport = str(rpc_port(n))
|
||||||
f.write("rpcport="+rpcport+"\n");
|
#f.write("rpcport="+rpcport+"\n");
|
||||||
print "RPC port=" + rpcport
|
#print "RPC port=" + rpcport
|
||||||
f.write("listenonion=0\n");
|
f.write("listenonion=0\n");
|
||||||
# TODO: maybe make these optional, defaulted to on for now
|
# TODO: maybe make these optional, defaulted to on for now
|
||||||
f.write("addressindex=1\n");
|
f.write("addressindex=1\n");
|
||||||
@@ -115,8 +115,11 @@ def initialize_chain(test_dir):
|
|||||||
cmd_args = cmd + " -datadir="+datadir + " -rpcwait getblockcount"
|
cmd_args = cmd + " -datadir="+datadir + " -rpcwait getblockcount"
|
||||||
if os.getenv("PYTHON_DEBUG", ""):
|
if os.getenv("PYTHON_DEBUG", ""):
|
||||||
print "initialize_chain: komodod started, calling: " + cmd_args
|
print "initialize_chain: komodod started, calling: " + cmd_args
|
||||||
subprocess.check_call([ cmd, "-datadir="+datadir,
|
strcmd = cmd + " " + "-datadir="+datadir + " -rpcwait getblockcount"
|
||||||
"-rpcwait", "getblockcount"]) #, stdout=devnull)
|
|
||||||
|
print("Running " + strcmd)
|
||||||
|
subprocess.check_call(strcmd, shell=True);
|
||||||
|
#subprocess.check_call([ cmd, "-rpcwait", "getblockcount"], stdout=devnull)
|
||||||
if os.getenv("PYTHON_DEBUG", ""):
|
if os.getenv("PYTHON_DEBUG", ""):
|
||||||
print "initialize_chain: komodo-cli -rpcwait getblockcount completed"
|
print "initialize_chain: komodo-cli -rpcwait getblockcount completed"
|
||||||
devnull.close()
|
devnull.close()
|
||||||
@@ -198,13 +201,20 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
|
|||||||
if extra_args is not None: args.extend(extra_args)
|
if extra_args is not None: args.extend(extra_args)
|
||||||
bitcoind_processes[i] = subprocess.Popen(args)
|
bitcoind_processes[i] = subprocess.Popen(args)
|
||||||
devnull = open("/dev/null", "w+")
|
devnull = open("/dev/null", "w+")
|
||||||
|
|
||||||
cmd = os.getenv("BITCOINCLI", "komodo-cli")
|
cmd = os.getenv("BITCOINCLI", "komodo-cli")
|
||||||
cmd_args = cmd + "-datadir="+datadir + " -rpcwait getblockcount"
|
print("cmd=" + cmd)
|
||||||
|
#TODO:
|
||||||
|
cmd_args = " -datadir="+datadir + " -rpcport=64368 -rpcwait -conf=" +datadir+"/komodo.conf getblockcount "
|
||||||
if os.getenv("PYTHON_DEBUG", ""):
|
if os.getenv("PYTHON_DEBUG", ""):
|
||||||
print "start_node: komodod started, calling : " + cmd_args
|
print "start_node: komodod started, calling : " + cmd + " " + cmd_args
|
||||||
subprocess.check_call([ os.getenv("BITCOINCLI", "komodo-cli"), "-datadir="+datadir] +
|
strcmd = cmd + " " + cmd_args
|
||||||
_rpchost_to_args(rpchost) +
|
|
||||||
["-rpcwait", "getblockcount"], stdout=devnull)
|
print("Running " + strcmd)
|
||||||
|
subprocess.check_call(strcmd, shell=True);
|
||||||
|
#subprocess.check_call([ os.getenv("BITCOINCLI", "komodo-cli"), "-datadir="+datadir] +
|
||||||
|
# _rpchost_to_args(rpchost) +
|
||||||
|
# ["-rpcwait", "-rpcport=6438", "getblockcount"], stdout=devnull)
|
||||||
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user