aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/util.py
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-10-27 13:34:46 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-10-27 13:39:25 -0400
commite4f79c0219b6febbaa6cb8858ad9a8904769f735 (patch)
treede2cfa3e5952fa98b337d82de2cd02a3f5562871 /qa/rpc-tests/util.py
parentb6c99efe9ccb44a4324bacb879ab1f43960bf69b (diff)
parent9f87325b220e6766ffee524ff54528d7bc2eb13f (diff)
Merge pull request #5139
9f87325 Start with tidier cache directories (Gavin Andresen) Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
Diffstat (limited to 'qa/rpc-tests/util.py')
-rw-r--r--qa/rpc-tests/util.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index b5368c273a..6d0b21c927 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -110,11 +110,14 @@ def initialize_chain(test_dir):
rpcs[i].setgenerate(True, 25)
sync_blocks(rpcs)
- # Shut them down, and remove debug.logs:
+ # Shut them down, and clean up cache directories:
stop_nodes(rpcs)
wait_bitcoinds()
for i in range(4):
- os.remove(debug_log("cache", i))
+ os.remove(log_filename("cache", i, "debug.log"))
+ os.remove(log_filename("cache", i, "db.log"))
+ os.remove(log_filename("cache", i, "peers.dat"))
+ os.remove(log_filename("cache", i, "fee_estimates.dat"))
for i in range(4):
from_dir = os.path.join("cache", "node"+str(i))
@@ -167,8 +170,8 @@ def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
if extra_args is None: extra_args = [ None for i in range(num_nodes) ]
return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ]
-def debug_log(dir, n_node):
- return os.path.join(dir, "node"+str(n_node), "regtest", "debug.log")
+def log_filename(dir, n_node, logname):
+ return os.path.join(dir, "node"+str(n_node), "regtest", logname)
def stop_node(node, i):
node.stop()