Browse Source

Remove manual debug settings in qa tests.

-debug and -logtimemicros are now set by default. Individual test cases
no longer need to set these parameters manually.
0.15
John Newbery 8 years ago
parent
commit
b0dec4a04a
  1. 10
      qa/rpc-tests/abandonconflict.py
  2. 6
      qa/rpc-tests/assumevalid.py
  3. 2
      qa/rpc-tests/bip65-cltv-p2p.py
  4. 2
      qa/rpc-tests/bip68-112-113-p2p.py
  5. 4
      qa/rpc-tests/bip68-sequence.py
  6. 2
      qa/rpc-tests/bip9-softforks.py
  7. 2
      qa/rpc-tests/bipdersig-p2p.py
  8. 2
      qa/rpc-tests/bumpfee.py
  9. 12
      qa/rpc-tests/import-rescan.py
  10. 6
      qa/rpc-tests/invalidateblock.py
  11. 2
      qa/rpc-tests/maxblocksinflight.py
  12. 4
      qa/rpc-tests/maxuploadtarget.py
  13. 2
      qa/rpc-tests/mempool_limit.py
  14. 4
      qa/rpc-tests/mempool_packages.py
  15. 2
      qa/rpc-tests/mempool_reorg.py
  16. 2
      qa/rpc-tests/mempool_resurrect_test.py
  17. 2
      qa/rpc-tests/mempool_spendcoinbase.py
  18. 8
      qa/rpc-tests/merkle_blocks.py
  19. 2
      qa/rpc-tests/nulldummy.py
  20. 4
      qa/rpc-tests/p2p-acceptblock.py
  21. 4
      qa/rpc-tests/p2p-compactblocks.py
  22. 4
      qa/rpc-tests/p2p-feefilter.py
  23. 2
      qa/rpc-tests/p2p-leaktests.py
  24. 2
      qa/rpc-tests/p2p-mempool.py
  25. 8
      qa/rpc-tests/p2p-segwit.py
  26. 3
      qa/rpc-tests/p2p-timeouts.py
  27. 2
      qa/rpc-tests/p2p-versionbits-warning.py
  28. 1
      qa/rpc-tests/preciousblock.py
  29. 2
      qa/rpc-tests/prioritise_transaction.py
  30. 8
      qa/rpc-tests/proxy_test.py
  31. 28
      qa/rpc-tests/pruning.py
  32. 2
      qa/rpc-tests/reindex.py
  33. 2
      qa/rpc-tests/replace-by-fee.py
  34. 6
      qa/rpc-tests/segwit.py
  35. 2
      qa/rpc-tests/sendheaders.py
  36. 3
      qa/rpc-tests/smartfees.py
  37. 2
      qa/rpc-tests/test_framework/test_framework.py

10
qa/rpc-tests/abandonconflict.py

@ -23,8 +23,8 @@ class AbandonConflictTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.00001"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-minrelaytxfee=0.00001"]))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug","-logtimemicros"])) self.nodes.append(start_node(1, self.options.tmpdir))
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
def run_test(self): def run_test(self):
@ -81,7 +81,7 @@ class AbandonConflictTest(BitcoinTestFramework):
# Restart the node with a higher min relay fee so the parent tx is no longer in mempool # Restart the node with a higher min relay fee so the parent tx is no longer in mempool
# TODO: redo with eviction # TODO: redo with eviction
stop_node(self.nodes[0],0) stop_node(self.nodes[0],0)
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.0001"]) self.nodes[0]=start_node(0, self.options.tmpdir, ["-minrelaytxfee=0.0001"])
# Verify txs no longer in mempool # Verify txs no longer in mempool
assert_equal(len(self.nodes[0].getrawmempool()), 0) assert_equal(len(self.nodes[0].getrawmempool()), 0)
@ -107,7 +107,7 @@ class AbandonConflictTest(BitcoinTestFramework):
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned # Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
stop_node(self.nodes[0],0) stop_node(self.nodes[0],0)
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.00001"]) self.nodes[0]=start_node(0, self.options.tmpdir, ["-minrelaytxfee=0.00001"])
assert_equal(len(self.nodes[0].getrawmempool()), 0) assert_equal(len(self.nodes[0].getrawmempool()), 0)
assert_equal(self.nodes[0].getbalance(), balance) assert_equal(self.nodes[0].getbalance(), balance)
@ -127,7 +127,7 @@ class AbandonConflictTest(BitcoinTestFramework):
# Remove using high relay fee again # Remove using high relay fee again
stop_node(self.nodes[0],0) stop_node(self.nodes[0],0)
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.0001"]) self.nodes[0]=start_node(0, self.options.tmpdir, ["-minrelaytxfee=0.0001"])
assert_equal(len(self.nodes[0].getrawmempool()), 0) assert_equal(len(self.nodes[0].getrawmempool()), 0)
newbalance = self.nodes[0].getbalance() newbalance = self.nodes[0].getbalance()
assert_equal(newbalance, balance - Decimal("24.9996")) assert_equal(newbalance, balance - Decimal("24.9996"))

6
qa/rpc-tests/assumevalid.py

@ -73,7 +73,7 @@ class SendHeadersTest(BitcoinTestFramework):
# we need to pre-mine a block with an invalid transaction # we need to pre-mine a block with an invalid transaction
# signature so we can pass in the block hash as assumevalid. # signature so we can pass in the block hash as assumevalid.
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(0, self.options.tmpdir))
def run_test(self): def run_test(self):
@ -146,14 +146,14 @@ class SendHeadersTest(BitcoinTestFramework):
# Start node1 and node2 with assumevalid so they accept a block with a bad signature. # Start node1 and node2 with assumevalid so they accept a block with a bad signature.
self.nodes.append(start_node(1, self.options.tmpdir, self.nodes.append(start_node(1, self.options.tmpdir,
["-debug", "-assumevalid=" + hex(block102.sha256)])) ["-assumevalid=" + hex(block102.sha256)]))
node1 = BaseNode() # connects to node1 node1 = BaseNode() # connects to node1
connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], node1)) connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], node1))
node1.add_connection(connections[1]) node1.add_connection(connections[1])
node1.wait_for_verack() node1.wait_for_verack()
self.nodes.append(start_node(2, self.options.tmpdir, self.nodes.append(start_node(2, self.options.tmpdir,
["-debug", "-assumevalid=" + hex(block102.sha256)])) ["-assumevalid=" + hex(block102.sha256)]))
node2 = BaseNode() # connects to node2 node2 = BaseNode() # connects to node2
connections.append(NodeConn('127.0.0.1', p2p_port(2), self.nodes[2], node2)) connections.append(NodeConn('127.0.0.1', p2p_port(2), self.nodes[2], node2))
node2.add_connection(connections[2]) node2.add_connection(connections[2])

2
qa/rpc-tests/bip65-cltv-p2p.py

@ -43,7 +43,7 @@ class BIP65Test(ComparisonTestFramework):
def setup_network(self): def setup_network(self):
# Must set the blockversion for this test # Must set the blockversion for this test
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1', '-blockversion=3']], extra_args=[['-whitelist=127.0.0.1', '-blockversion=3']],
binary=[self.options.testbinary]) binary=[self.options.testbinary])
def run_test(self): def run_test(self):

2
qa/rpc-tests/bip68-112-113-p2p.py

@ -99,7 +99,7 @@ class BIP68_112_113Test(ComparisonTestFramework):
def setup_network(self): def setup_network(self):
# Must set the blockversion for this test # Must set the blockversion for this test
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1', '-blockversion=4']], extra_args=[['-whitelist=127.0.0.1', '-blockversion=4']],
binary=[self.options.testbinary]) binary=[self.options.testbinary])
def run_test(self): def run_test(self):

4
qa/rpc-tests/bip68-sequence.py

@ -24,8 +24,8 @@ class BIP68Test(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(0, self.options.tmpdir))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-acceptnonstdtxn=0"])) self.nodes.append(start_node(1, self.options.tmpdir, ["-acceptnonstdtxn=0"]))
self.is_network_split = False self.is_network_split = False
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"] self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)

2
qa/rpc-tests/bip9-softforks.py

@ -35,7 +35,7 @@ class BIP9SoftForksTest(ComparisonTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1']], extra_args=[['-whitelist=127.0.0.1']],
binary=[self.options.testbinary]) binary=[self.options.testbinary])
def run_test(self): def run_test(self):

2
qa/rpc-tests/bipdersig-p2p.py

@ -50,7 +50,7 @@ class BIP66Test(ComparisonTestFramework):
def setup_network(self): def setup_network(self):
# Must set the blockversion for this test # Must set the blockversion for this test
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1', '-blockversion=2']], extra_args=[['-whitelist=127.0.0.1', '-blockversion=2']],
binary=[self.options.testbinary]) binary=[self.options.testbinary])
def run_test(self): def run_test(self):

2
qa/rpc-tests/bumpfee.py

@ -26,7 +26,7 @@ class BumpFeeTest(BitcoinTestFramework):
self.setup_clean_chain = True self.setup_clean_chain = True
def setup_network(self, split=False): def setup_network(self, split=False):
extra_args = [["-debug", "-prematurewitness", "-walletprematurewitness", "-walletrbf={}".format(i)] extra_args = [["-prematurewitness", "-walletprematurewitness", "-walletrbf={}".format(i)]
for i in range(self.num_nodes)] for i in range(self.num_nodes)]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)

12
qa/rpc-tests/import-rescan.py

@ -7,11 +7,11 @@
Test rescan behavior of importaddress, importpubkey, importprivkey, and Test rescan behavior of importaddress, importpubkey, importprivkey, and
importmulti RPCs with different types of keys and rescan options. importmulti RPCs with different types of keys and rescan options.
In the first part of the test, node 1 creates an address for each type of In the first part of the test, node 0 creates an address for each type of
import RPC call and node 0 sends BTC to it. Then other nodes import the import RPC call and sends BTC to it. Then other nodes import the addresses,
addresses, and the test makes listtransactions and getbalance calls to confirm and the test makes listtransactions and getbalance calls to confirm that the
that the importing node either did or did not execute rescans picking up the importing node either did or did not execute rescans picking up the send
send transactions. transactions.
In the second part of the test, node 0 sends more BTC to each address, and the In the second part of the test, node 0 sends more BTC to each address, and the
test makes more listtransactions and getbalance calls to confirm that the test makes more listtransactions and getbalance calls to confirm that the
@ -117,7 +117,7 @@ class ImportRescanTest(BitcoinTestFramework):
self.num_nodes = 2 + len(IMPORT_NODES) self.num_nodes = 2 + len(IMPORT_NODES)
def setup_network(self): def setup_network(self):
extra_args = [["-debug=1"] for _ in range(self.num_nodes)] extra_args = [[] for _ in range(self.num_nodes)]
for i, import_node in enumerate(IMPORT_NODES, 2): for i, import_node in enumerate(IMPORT_NODES, 2):
if import_node.prune: if import_node.prune:
extra_args[i] += ["-prune=1"] extra_args[i] += ["-prune=1"]

6
qa/rpc-tests/invalidateblock.py

@ -18,9 +18,9 @@ class InvalidateTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.is_network_split = False self.is_network_split = False
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(0, self.options.tmpdir))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(1, self.options.tmpdir))
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(2, self.options.tmpdir))
def run_test(self): def run_test(self):
print("Make sure we repopulate setBlockIndexCandidates after InvalidateBlock:") print("Make sure we repopulate setBlockIndexCandidates after InvalidateBlock:")

2
qa/rpc-tests/maxblocksinflight.py

@ -84,7 +84,7 @@ class MaxBlocksInFlightTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1']], extra_args=[['-whitelist=127.0.0.1']],
binary=[self.options.testbinary]) binary=[self.options.testbinary])
def run_test(self): def run_test(self):

4
qa/rpc-tests/maxuploadtarget.py

@ -90,7 +90,7 @@ class MaxUploadTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
# Start a node with maxuploadtarget of 200 MB (/24h) # Start a node with maxuploadtarget of 200 MB (/24h)
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxuploadtarget=800", "-blockmaxsize=999000"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-maxuploadtarget=800", "-blockmaxsize=999000"]))
def run_test(self): def run_test(self):
# Before we connect anything, we first set the time on the node # Before we connect anything, we first set the time on the node
@ -199,7 +199,7 @@ class MaxUploadTest(BitcoinTestFramework):
#stop and start node 0 with 1MB maxuploadtarget, whitelist 127.0.0.1 #stop and start node 0 with 1MB maxuploadtarget, whitelist 127.0.0.1
print("Restarting nodes with -whitelist=127.0.0.1") print("Restarting nodes with -whitelist=127.0.0.1")
stop_node(self.nodes[0], 0) stop_node(self.nodes[0], 0)
self.nodes[0] = start_node(0, self.options.tmpdir, ["-debug", "-whitelist=127.0.0.1", "-maxuploadtarget=1", "-blockmaxsize=999000"]) self.nodes[0] = start_node(0, self.options.tmpdir, ["-whitelist=127.0.0.1", "-maxuploadtarget=1", "-blockmaxsize=999000"])
#recreate/reconnect 3 test nodes #recreate/reconnect 3 test nodes
test_nodes = [] test_nodes = []

2
qa/rpc-tests/mempool_limit.py

@ -11,7 +11,7 @@ class MempoolLimitTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxmempool=5", "-spendzeroconfchange=0", "-debug"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-maxmempool=5", "-spendzeroconfchange=0"]))
self.is_network_split = False self.is_network_split = False
self.sync_all() self.sync_all()
self.relayfee = self.nodes[0].getnetworkinfo()['relayfee'] self.relayfee = self.nodes[0].getnetworkinfo()['relayfee']

4
qa/rpc-tests/mempool_packages.py

@ -19,8 +19,8 @@ class MempoolPackagesTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000"]))
self.nodes.append(start_node(1, self.options.tmpdir, ["-maxorphantx=1000", "-limitancestorcount=5", "-debug"])) self.nodes.append(start_node(1, self.options.tmpdir, ["-maxorphantx=1000", "-limitancestorcount=5"]))
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
self.is_network_split = False self.is_network_split = False
self.sync_all() self.sync_all()

2
qa/rpc-tests/mempool_reorg.py

@ -21,7 +21,7 @@ class MempoolCoinbaseTest(BitcoinTestFramework):
alert_filename = None # Set by setup_network alert_filename = None # Set by setup_network
def setup_network(self): def setup_network(self):
args = ["-checkmempool", "-debug=mempool"] args = ["-checkmempool"]
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, args)) self.nodes.append(start_node(0, self.options.tmpdir, args))
self.nodes.append(start_node(1, self.options.tmpdir, args)) self.nodes.append(start_node(1, self.options.tmpdir, args))

2
qa/rpc-tests/mempool_resurrect_test.py

@ -17,7 +17,7 @@ class MempoolCoinbaseTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
# Just need one node for this test # Just need one node for this test
args = ["-checkmempool", "-debug=mempool"] args = ["-checkmempool"]
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, args)) self.nodes.append(start_node(0, self.options.tmpdir, args))
self.is_network_split = False self.is_network_split = False

2
qa/rpc-tests/mempool_spendcoinbase.py

@ -25,7 +25,7 @@ class MempoolSpendCoinbaseTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
# Just need one node for this test # Just need one node for this test
args = ["-checkmempool", "-debug=mempool"] args = ["-checkmempool"]
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, args)) self.nodes.append(start_node(0, self.options.tmpdir, args))
self.is_network_split = False self.is_network_split = False

8
qa/rpc-tests/merkle_blocks.py

@ -17,11 +17,11 @@ class MerkleBlockTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
# Nodes 0/1 are "wallet" nodes # Nodes 0/1 are "wallet" nodes
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(0, self.options.tmpdir))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(1, self.options.tmpdir))
# Nodes 2/3 are used for testing # Nodes 2/3 are used for testing
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug"])) self.nodes.append(start_node(2, self.options.tmpdir))
self.nodes.append(start_node(3, self.options.tmpdir, ["-debug", "-txindex"])) self.nodes.append(start_node(3, self.options.tmpdir, ["-txindex"]))
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
connect_nodes(self.nodes[0], 2) connect_nodes(self.nodes[0], 2)
connect_nodes(self.nodes[0], 3) connect_nodes(self.nodes[0], 3)

2
qa/rpc-tests/nulldummy.py

@ -45,7 +45,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
# Must set the blockversion for this test # Must set the blockversion for this test
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1', '-walletprematurewitness']]) extra_args=[['-whitelist=127.0.0.1', '-walletprematurewitness']])
def run_test(self): def run_test(self):
self.address = self.nodes[0].getnewaddress() self.address = self.nodes[0].getnewaddress()

4
qa/rpc-tests/p2p-acceptblock.py

@ -119,10 +119,10 @@ class AcceptBlockTest(BitcoinTestFramework):
# from peers which are not whitelisted, while Node1 will be used for # from peers which are not whitelisted, while Node1 will be used for
# the whitelisted case. # the whitelisted case.
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"], self.nodes.append(start_node(0, self.options.tmpdir,
binary=self.options.testbinary)) binary=self.options.testbinary))
self.nodes.append(start_node(1, self.options.tmpdir, self.nodes.append(start_node(1, self.options.tmpdir,
["-debug", "-whitelist=127.0.0.1"], ["-whitelist=127.0.0.1"],
binary=self.options.testbinary)) binary=self.options.testbinary))
def run_test(self): def run_test(self):

4
qa/rpc-tests/p2p-compactblocks.py

@ -120,8 +120,8 @@ class CompactBlocksTest(BitcoinTestFramework):
# Start up node0 to be a version 1, pre-segwit node. # Start up node0 to be a version 1, pre-segwit node.
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
[["-debug", "-logtimemicros=1", "-bip9params=segwit:0:0"], [["-bip9params=segwit:0:0"],
["-debug", "-logtimemicros", "-txindex"]]) ["-txindex"]])
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
def build_block_on_tip(self, node, segwit=False): def build_block_on_tip(self, node, segwit=False):

4
qa/rpc-tests/p2p-feefilter.py

@ -53,8 +53,8 @@ class FeeFilterTest(BitcoinTestFramework):
# Node1 will be used to generate txs which should be relayed from Node0 # Node1 will be used to generate txs which should be relayed from Node0
# to our test node # to our test node
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros"])) self.nodes.append(start_node(0, self.options.tmpdir))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-logtimemicros"])) self.nodes.append(start_node(1, self.options.tmpdir))
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
def run_test(self): def run_test(self):

2
qa/rpc-tests/p2p-leaktests.py

@ -102,7 +102,7 @@ class P2PLeakTest(BitcoinTestFramework):
super().__init__() super().__init__()
self.num_nodes = 1 self.num_nodes = 1
def setup_network(self): def setup_network(self):
extra_args = [['-debug', '-banscore='+str(banscore)] extra_args = [['-banscore='+str(banscore)]
for i in range(self.num_nodes)] for i in range(self.num_nodes)]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)

2
qa/rpc-tests/p2p-mempool.py

@ -85,7 +85,7 @@ class P2PMempoolTests(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
# Start a node with maxuploadtarget of 200 MB (/24h) # Start a node with maxuploadtarget of 200 MB (/24h)
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-peerbloomfilters=0"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-peerbloomfilters=0"]))
def run_test(self): def run_test(self):
#connect a mininode #connect a mininode

8
qa/rpc-tests/p2p-segwit.py

@ -194,13 +194,13 @@ class SegWitTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-whitelist=127.0.0.1"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-whitelist=127.0.0.1"]))
# Start a node for testing IsStandard rules. # Start a node for testing IsStandard rules.
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-whitelist=127.0.0.1", "-acceptnonstdtxn=0"])) self.nodes.append(start_node(1, self.options.tmpdir, ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0"]))
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
# Disable segwit's bip9 parameter to simulate upgrading after activation. # Disable segwit's bip9 parameter to simulate upgrading after activation.
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug", "-whitelist=127.0.0.1", "-bip9params=segwit:0:0"])) self.nodes.append(start_node(2, self.options.tmpdir, ["-whitelist=127.0.0.1", "-bip9params=segwit:0:0"]))
connect_nodes(self.nodes[0], 2) connect_nodes(self.nodes[0], 2)
''' Helpers ''' ''' Helpers '''
@ -1572,7 +1572,7 @@ class SegWitTest(BitcoinTestFramework):
# Restart with the new binary # Restart with the new binary
stop_node(node, node_id) stop_node(node, node_id)
self.nodes[node_id] = start_node(node_id, self.options.tmpdir, ["-debug"]) self.nodes[node_id] = start_node(node_id, self.options.tmpdir)
connect_nodes(self.nodes[0], node_id) connect_nodes(self.nodes[0], node_id)
sync_blocks(self.nodes) sync_blocks(self.nodes)

3
qa/rpc-tests/p2p-timeouts.py

@ -53,8 +53,7 @@ class TimeoutsTest(BitcoinTestFramework):
self.nodes = [] self.nodes = []
# Start up node0 to be a version 1, pre-segwit node. # Start up node0 to be a version 1, pre-segwit node.
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.nodes = start_nodes(self.num_nodes, self.options.tmpdir)
[["-debug", "-logtimemicros=1"]])
def run_test(self): def run_test(self):
# Setup the p2p connections and start up the network thread. # Setup the p2p connections and start up the network thread.

2
qa/rpc-tests/p2p-versionbits-warning.py

@ -72,7 +72,7 @@ class VersionBitsWarningTest(BitcoinTestFramework):
# Open and close to create zero-length file # Open and close to create zero-length file
with open(self.alert_filename, 'w', encoding='utf8') as _: with open(self.alert_filename, 'w', encoding='utf8') as _:
pass pass
self.extra_args = [["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]] self.extra_args = [["-alertnotify=echo %s >> \"" + self.alert_filename + "\""]]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
# Send numblocks blocks via peer with nVersionToUse set. # Send numblocks blocks via peer with nVersionToUse set.

1
qa/rpc-tests/preciousblock.py

@ -39,7 +39,6 @@ class PreciousTest(BitcoinTestFramework):
super().__init__() super().__init__()
self.setup_clean_chain = True self.setup_clean_chain = True
self.num_nodes = 3 self.num_nodes = 3
self.extra_args = [["-debug"]] * self.num_nodes
def setup_network(self): def setup_network(self):
self.nodes = self.setup_nodes() self.nodes = self.setup_nodes()

2
qa/rpc-tests/prioritise_transaction.py

@ -21,7 +21,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
self.nodes = [] self.nodes = []
self.is_network_split = False self.is_network_split = False
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-printpriority=1"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-printpriority=1"]))
self.relayfee = self.nodes[0].getnetworkinfo()['relayfee'] self.relayfee = self.nodes[0].getnetworkinfo()['relayfee']
def run_test(self): def run_test(self):

8
qa/rpc-tests/proxy_test.py

@ -83,13 +83,13 @@ class ProxyTest(BitcoinTestFramework):
# Note: proxies are not used to connect to local nodes # Note: proxies are not used to connect to local nodes
# this is because the proxy to use is based on CService.GetNetwork(), which return NET_UNROUTABLE for localhost # this is because the proxy to use is based on CService.GetNetwork(), which return NET_UNROUTABLE for localhost
args = [ args = [
['-listen', '-debug=net', '-debug=proxy', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'], ['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-proxyrandomize=1'],
['-listen', '-debug=net', '-debug=proxy', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'], ['-listen', '-proxy=%s:%i' % (self.conf1.addr),'-onion=%s:%i' % (self.conf2.addr),'-proxyrandomize=0'],
['-listen', '-debug=net', '-debug=proxy', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'], ['-listen', '-proxy=%s:%i' % (self.conf2.addr),'-proxyrandomize=1'],
[] []
] ]
if self.have_ipv6: if self.have_ipv6:
args[3] = ['-listen', '-debug=net', '-debug=proxy', '-proxy=[%s]:%i' % (self.conf3.addr),'-proxyrandomize=0', '-noonion'] args[3] = ['-listen', '-proxy=[%s]:%i' % (self.conf3.addr),'-proxyrandomize=0', '-noonion']
return start_nodes(self.num_nodes, self.options.tmpdir, extra_args=args) return start_nodes(self.num_nodes, self.options.tmpdir, extra_args=args)
def node_test(self, node, proxies, auth, test_onion=True): def node_test(self, node, proxies, auth, test_onion=True):

28
qa/rpc-tests/pruning.py

@ -41,19 +41,19 @@ class PruneTest(BitcoinTestFramework):
self.is_network_split = False self.is_network_split = False
# Create nodes 0 and 1 to mine # Create nodes 0 and 1 to mine
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900)) self.nodes.append(start_node(0, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900))
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900)) self.nodes.append(start_node(1, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900))
# Create node 2 to test pruning # Create node 2 to test pruning
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-prune=550"], timewait=900)) self.nodes.append(start_node(2, self.options.tmpdir, ["-maxreceivebuffer=20000","-prune=550"], timewait=900))
self.prunedir = self.options.tmpdir+"/node2/regtest/blocks/" self.prunedir = self.options.tmpdir+"/node2/regtest/blocks/"
# Create nodes 3 and 4 to test manual pruning (they will be re-started with manual pruning later) # Create nodes 3 and 4 to test manual pruning (they will be re-started with manual pruning later)
self.nodes.append(start_node(3, self.options.tmpdir, ["-debug=0","-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900)) self.nodes.append(start_node(3, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900))
self.nodes.append(start_node(4, self.options.tmpdir, ["-debug=0","-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900)) self.nodes.append(start_node(4, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900))
# Create nodes 5 to test wallet in prune mode, but do not connect # Create nodes 5 to test wallet in prune mode, but do not connect
self.nodes.append(start_node(5, self.options.tmpdir, ["-debug=0", "-prune=550"])) self.nodes.append(start_node(5, self.options.tmpdir, ["-prune=550"]))
# Determine default relay fee # Determine default relay fee
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"] self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
@ -107,7 +107,7 @@ class PruneTest(BitcoinTestFramework):
# Node 2 stays connected, so it hears about the stale blocks and then reorg's when node0 reconnects # Node 2 stays connected, so it hears about the stale blocks and then reorg's when node0 reconnects
# Stopping node 0 also clears its mempool, so it doesn't have node1's transactions to accidentally mine # Stopping node 0 also clears its mempool, so it doesn't have node1's transactions to accidentally mine
self.stop_node(0) self.stop_node(0)
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900) self.nodes[0]=start_node(0, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900)
# Mine 24 blocks in node 1 # Mine 24 blocks in node 1
for i in range(24): for i in range(24):
if j == 0: if j == 0:
@ -132,7 +132,7 @@ class PruneTest(BitcoinTestFramework):
# Reboot node 1 to clear its mempool (hopefully make the invalidate faster) # Reboot node 1 to clear its mempool (hopefully make the invalidate faster)
# Lower the block max size so we don't keep mining all our big mempool transactions (from disconnected blocks) # Lower the block max size so we don't keep mining all our big mempool transactions (from disconnected blocks)
self.stop_node(1) self.stop_node(1)
self.nodes[1]=start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=5000", "-checkblocks=5", "-disablesafemode"], timewait=900) self.nodes[1]=start_node(1, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=5000", "-checkblocks=5", "-disablesafemode"], timewait=900)
height = self.nodes[1].getblockcount() height = self.nodes[1].getblockcount()
print("Current block height:", height) print("Current block height:", height)
@ -155,7 +155,7 @@ class PruneTest(BitcoinTestFramework):
# Reboot node1 to clear those giant tx's from mempool # Reboot node1 to clear those giant tx's from mempool
self.stop_node(1) self.stop_node(1)
self.nodes[1]=start_node(1, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=5000", "-checkblocks=5", "-disablesafemode"], timewait=900) self.nodes[1]=start_node(1, self.options.tmpdir, ["-maxreceivebuffer=20000","-blockmaxsize=5000", "-checkblocks=5", "-disablesafemode"], timewait=900)
print("Generating new longer chain of 300 more blocks") print("Generating new longer chain of 300 more blocks")
self.nodes[1].generate(300) self.nodes[1].generate(300)
@ -228,13 +228,13 @@ class PruneTest(BitcoinTestFramework):
def manual_test(self, node_number, use_timestamp): def manual_test(self, node_number, use_timestamp):
# at this point, node has 995 blocks and has not yet run in prune mode # at this point, node has 995 blocks and has not yet run in prune mode
node = self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0"], timewait=900) node = self.nodes[node_number] = start_node(node_number, self.options.tmpdir, timewait=900)
assert_equal(node.getblockcount(), 995) assert_equal(node.getblockcount(), 995)
assert_raises_jsonrpc(-1, "not in prune mode", node.pruneblockchain, 500) assert_raises_jsonrpc(-1, "not in prune mode", node.pruneblockchain, 500)
self.stop_node(node_number) self.stop_node(node_number)
# now re-start in manual pruning mode # now re-start in manual pruning mode
node = self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0","-prune=1"], timewait=900) node = self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-prune=1"], timewait=900)
assert_equal(node.getblockcount(), 995) assert_equal(node.getblockcount(), 995)
def height(index): def height(index):
@ -308,7 +308,7 @@ class PruneTest(BitcoinTestFramework):
# stop node, start back up with auto-prune at 550MB, make sure still runs # stop node, start back up with auto-prune at 550MB, make sure still runs
self.stop_node(node_number) self.stop_node(node_number)
self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0","-prune=550"], timewait=900) self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-prune=550"], timewait=900)
print("Success") print("Success")
@ -316,7 +316,7 @@ class PruneTest(BitcoinTestFramework):
# check that the pruning node's wallet is still in good shape # check that the pruning node's wallet is still in good shape
print("Stop and start pruning node to trigger wallet rescan") print("Stop and start pruning node to trigger wallet rescan")
self.stop_node(2) self.stop_node(2)
start_node(2, self.options.tmpdir, ["-debug=1","-prune=550"]) start_node(2, self.options.tmpdir, ["-prune=550"])
print("Success") print("Success")
# check that wallet loads loads successfully when restarting a pruned node after IBD. # check that wallet loads loads successfully when restarting a pruned node after IBD.
@ -326,7 +326,7 @@ class PruneTest(BitcoinTestFramework):
nds = [self.nodes[0], self.nodes[5]] nds = [self.nodes[0], self.nodes[5]]
sync_blocks(nds, wait=5, timeout=300) sync_blocks(nds, wait=5, timeout=300)
self.stop_node(5) #stop and start to trigger rescan self.stop_node(5) #stop and start to trigger rescan
start_node(5, self.options.tmpdir, ["-debug=1","-prune=550"]) start_node(5, self.options.tmpdir, ["-prune=550"])
print ("Success") print ("Success")
def run_test(self): def run_test(self):

2
qa/rpc-tests/reindex.py

@ -31,7 +31,7 @@ class ReindexTest(BitcoinTestFramework):
self.nodes[0].generate(3) self.nodes[0].generate(3)
blockcount = self.nodes[0].getblockcount() blockcount = self.nodes[0].getblockcount()
stop_nodes(self.nodes) stop_nodes(self.nodes)
extra_args = [["-debug", "-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"]] extra_args = [["-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"]]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
while self.nodes[0].getblockcount() < blockcount: while self.nodes[0].getblockcount() < blockcount:
time.sleep(0.1) time.sleep(0.1)

2
qa/rpc-tests/replace-by-fee.py

@ -72,7 +72,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug", self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000",
"-whitelist=127.0.0.1", "-whitelist=127.0.0.1",
"-limitancestorcount=50", "-limitancestorcount=50",
"-limitancestorsize=101", "-limitancestorsize=101",

6
qa/rpc-tests/segwit.py

@ -82,9 +82,9 @@ class SegWitTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-logtimemicros", "-debug", "-walletprematurewitness", "-rpcserialversion=0"])) self.nodes.append(start_node(0, self.options.tmpdir, ["-walletprematurewitness", "-rpcserialversion=0"]))
self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness", "-rpcserialversion=1"])) self.nodes.append(start_node(1, self.options.tmpdir, ["-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness", "-rpcserialversion=1"]))
self.nodes.append(start_node(2, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=536870915", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"])) self.nodes.append(start_node(2, self.options.tmpdir, ["-blockversion=536870915", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"]))
connect_nodes(self.nodes[1], 0) connect_nodes(self.nodes[1], 0)
connect_nodes(self.nodes[2], 1) connect_nodes(self.nodes[2], 1)
connect_nodes(self.nodes[0], 2) connect_nodes(self.nodes[0], 2)

2
qa/rpc-tests/sendheaders.py

@ -229,7 +229,7 @@ class SendHeadersTest(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = [] self.nodes = []
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [["-debug", "-logtimemicros=1"]]*2) self.nodes = start_nodes(self.num_nodes, self.options.tmpdir)
connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[0], 1)
# mine count blocks and return the new tip # mine count blocks and return the new tip

3
qa/rpc-tests/smartfees.py

@ -193,8 +193,7 @@ class EstimateFeeTest(BitcoinTestFramework):
# NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes, # NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
# (17k is room enough for 110 or so transactions) # (17k is room enough for 110 or so transactions)
self.nodes.append(start_node(1, self.options.tmpdir, self.nodes.append(start_node(1, self.options.tmpdir,
["-blockmaxsize=17000", ["-blockmaxsize=17000", "-maxorphantx=1000"]))
"-maxorphantx=1000", "-debug=estimatefee"]))
connect_nodes(self.nodes[1], 0) connect_nodes(self.nodes[1], 0)
# Node2 is a stingy miner, that # Node2 is a stingy miner, that

2
qa/rpc-tests/test_framework/test_framework.py

@ -239,6 +239,6 @@ class ComparisonTestFramework(BitcoinTestFramework):
def setup_network(self): def setup_network(self):
self.nodes = start_nodes( self.nodes = start_nodes(
self.num_nodes, self.options.tmpdir, self.num_nodes, self.options.tmpdir,
extra_args=[['-debug', '-whitelist=127.0.0.1']] * self.num_nodes, extra_args=[['-whitelist=127.0.0.1']] * self.num_nodes,
binary=[self.options.testbinary] + binary=[self.options.testbinary] +
[self.options.refbinary]*(self.num_nodes-1)) [self.options.refbinary]*(self.num_nodes-1))

Loading…
Cancel
Save