From fba6a314b84852289bdb8447f0993952dcbbc8e0 Mon Sep 17 00:00:00 2001 From: Team ChainStrike Date: Sat, 29 Sep 2018 08:33:23 +1000 Subject: [PATCH] Enable indexes in regtest mode so we can test them --- qa/rpc-tests/dpow.py | 3 ++- qa/rpc-tests/test_framework/util.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/dpow.py b/qa/rpc-tests/dpow.py index c9247f404..8c78b92cf 100755 --- a/qa/rpc-tests/dpow.py +++ b/qa/rpc-tests/dpow.py @@ -12,7 +12,8 @@ class DPoWTest(BitcoinTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) - initialize_chain_clean(self.options.tmpdir, 1) + num_nodes = 1 + initialize_chain_clean(self.options.tmpdir, num_nodes) def setup_network(self): self.nodes = [] diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 17e2a4b22..3ee5972b0 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -83,6 +83,10 @@ def initialize_datadir(dirname, n): f.write("port="+str(p2p_port(n))+"\n"); f.write("rpcport="+str(rpc_port(n))+"\n"); f.write("listenonion=0\n"); + # TODO: maybe make these optional, defaulted to on for now + f.write("addressindex=1\n"); + f.write("spentindex=1\n"); + f.write("timestampindex=1\n"); return datadir def initialize_chain(test_dir): @@ -103,6 +107,7 @@ def initialize_chain(test_dir): bitcoind_processes[i] = subprocess.Popen(args) if os.getenv("PYTHON_DEBUG", ""): print "initialize_chain: hushd started, calling hush-cli -rpcwait getblockcount" + print [ os.getenv("BITCOINCLI", "hush-cli"), "-datadir="+datadir, "-rpcwait", "getblockcount"] subprocess.check_call([ os.getenv("BITCOINCLI", "hush-cli"), "-datadir="+datadir, "-rpcwait", "getblockcount"], stdout=devnull) if os.getenv("PYTHON_DEBUG", ""):