Apply suggestions from code review

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
This commit is contained in:
PastaPastaPasta 2020-03-24 16:42:29 +00:00 committed by Pasta
parent d94dd15de7
commit 6e54327ef2
3 changed files with 5 additions and 11 deletions

View File

@ -2,7 +2,7 @@
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify that starting bitcoin with -h works as expected."""
"""Verify that starting dashd with -h works as expected."""
import subprocess
from test_framework.test_framework import BitcoinTestFramework
@ -18,7 +18,7 @@ class HelpTest(BitcoinTestFramework):
# Don't start the node
def run_test(self):
self.log.info("Start bitcoin with -h for help text")
self.log.info("Start dashd with -h for help text")
self.nodes[0].start(extra_args=['-h'], stderr=subprocess.PIPE, stdout=subprocess.PIPE)
# Node should exit immediately and output help to stdout.
ret_code = self.nodes[0].process.wait(timeout=1)
@ -28,7 +28,7 @@ class HelpTest(BitcoinTestFramework):
self.log.info("Help text received: {} (...)".format(output[0:60]))
self.nodes[0].running = False
self.log.info("Start bitcoin with -version for version information")
self.log.info("Start dashd with -version for version information")
self.nodes[0].start(extra_args=['-version'], stderr=subprocess.PIPE, stdout=subprocess.PIPE)
# Node should exit immediately and output version to stdout.
ret_code = self.nodes[0].process.wait(timeout=1)

View File

@ -89,8 +89,7 @@ from test_framework.blocktools import create_block, create_coinbase
from test_framework.mininode import (
CBlockHeader,
CInv,
NODE_WITNESS,
NetworkThread,
network_thread_start,
NodeConnCB,
mininode_lock,
msg_block,
@ -257,11 +256,6 @@ class SendHeadersTest(BitcoinTestFramework):
inv_node.check_last_announcement(inv=[tip_hash], headers=[])
test_node.check_last_announcement(inv=[tip_hash], headers=[])
# TODO this partly fixes the same thing that is fixed by https://github.com/bitcoin/bitcoin/pull/13192
# This will later conflict when backporting the actual fix. Just take everything from the Bitcoin fix as a
# resolution
assert_equal(test_node.check_last_announcement(headers=[], inv=[tip_hash]), True)
self.log.info("Verify getheaders with null locator and valid hashstop returns headers.")
test_node.clear_last_announcement()
test_node.send_get_headers(locator=[], hashstop=tip_hash)

View File

@ -464,7 +464,7 @@ class BitcoinTestFramework():
for i in range(MAX_NODES):
for entry in os.listdir(cache_path(i)):
if entry not in ['wallets', 'chainstate', 'blocks']:
if entry not in ['wallets', 'chainstate', 'blocks', 'evodb', 'llmq', 'backups']:
os.remove(cache_path(i, entry))
for i in range(self.num_nodes):