aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/README.md8
-rw-r--r--test/config.ini.in1
-rwxr-xr-xtest/functional/interface_bitcoin_cli.py3
-rwxr-xr-xtest/functional/mempool_accept.py6
-rwxr-xr-xtest/functional/mempool_packages.py17
-rwxr-xr-xtest/functional/p2p_invalid_messages.py37
-rwxr-xr-xtest/functional/p2p_segwit.py4
-rwxr-xr-xtest/functional/rpc_fundrawtransaction.py34
-rwxr-xr-xtest/functional/test_framework/test_framework.py9
-rwxr-xr-xtest/functional/test_framework/test_node.py46
-rwxr-xr-xtest/functional/test_runner.py5
-rwxr-xr-xtest/functional/tool_wallet.py1
-rwxr-xr-xtest/functional/wallet_avoidreuse.py9
-rwxr-xr-xtest/functional/wallet_bumpfee.py12
-rwxr-xr-xtest/functional/wallet_listreceivedby.py1
-rwxr-xr-xtest/functional/wallet_listsinceblock.py5
-rwxr-xr-xtest/functional/wallet_listtransactions.py7
-rwxr-xr-xtest/fuzz/test_runner.py2
-rwxr-xr-xtest/lint/lint-circular-dependencies.sh4
-rwxr-xr-xtest/lint/lint-python.sh4
-rw-r--r--test/sanitizer_suppressions/lsan1
21 files changed, 97 insertions, 119 deletions
diff --git a/test/README.md b/test/README.md
index 11adc11278..24a9389fac 100644
--- a/test/README.md
+++ b/test/README.md
@@ -254,7 +254,13 @@ Use the `-v` option for verbose output.
#### Dependencies
-The lint tests require codespell and flake8. To install: `pip3 install codespell flake8`.
+| Lint test | Dependency | Version [used by CI](../ci/lint/04_install.sh) | Installation
+|-----------|:----------:|:-------------------------------------------:|--------------
+| [`lint-python.sh`](lint/lint-python.sh) | [flake8](https://gitlab.com/pycqa/flake8) | [3.7.8](https://github.com/bitcoin/bitcoin/pull/15257) | `pip3 install flake8==3.7.8`
+| [`lint-shell.sh`](lint/lint-shell.sh) | [ShellCheck](https://github.com/koalaman/shellcheck) | [0.6.0](https://github.com/bitcoin/bitcoin/pull/15166) | [details...](https://github.com/koalaman/shellcheck#installing)
+| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [1.15.0](https://github.com/bitcoin/bitcoin/pull/16186) | `pip3 install codespell==1.15.0`
+
+Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.
#### Running the tests
diff --git a/test/config.ini.in b/test/config.ini.in
index 060c553da2..9687206ee1 100644
--- a/test/config.ini.in
+++ b/test/config.ini.in
@@ -16,6 +16,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
@ENABLE_WALLET_TRUE@ENABLE_WALLET=true
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
+@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true
@ENABLE_FUZZ_TRUE@ENABLE_FUZZ=true
@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=true
diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py
index 0a378c5ef5..ec1c88ed53 100755
--- a/test/functional/interface_bitcoin_cli.py
+++ b/test/functional/interface_bitcoin_cli.py
@@ -12,6 +12,9 @@ class TestBitcoinCli(BitcoinTestFramework):
self.setup_clean_chain = True
self.num_nodes = 1
+ def skip_test_if_missing_module(self):
+ self.skip_if_no_cli()
+
def run_test(self):
"""Main test logic"""
diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py
index c466b120f2..0eef1d3ddf 100755
--- a/test/functional/mempool_accept.py
+++ b/test/functional/mempool_accept.py
@@ -267,6 +267,12 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
rawtxs=[tx.serialize().hex()],
)
tx.deserialize(BytesIO(hex_str_to_bytes(raw_tx_reference)))
+ tx.vin[0].scriptSig = CScript([b'a' * 1648]) # Some too large scriptSig (>1650 bytes)
+ self.check_mempool_result(
+ result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'scriptsig-size'}],
+ rawtxs=[tx.serialize().hex()],
+ )
+ tx.deserialize(BytesIO(hex_str_to_bytes(raw_tx_reference)))
output_p2sh_burn = CTxOut(nValue=540, scriptPubKey=CScript([OP_HASH160, hash160(b'burn'), OP_EQUAL]))
num_scripts = 100000 // len(output_p2sh_burn.serialize()) # Use enough outputs to make the tx too large for our policy
tx.vout = [output_p2sh_burn] * num_scripts
diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py
index c7d241503a..7014105d88 100755
--- a/test/functional/mempool_packages.py
+++ b/test/functional/mempool_packages.py
@@ -14,13 +14,19 @@ from test_framework.util import (
satoshi_round,
)
+# default limits
MAX_ANCESTORS = 25
MAX_DESCENDANTS = 25
+# custom limits for node1
+MAX_ANCESTORS_CUSTOM = 5
class MempoolPackagesTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
- self.extra_args = [["-maxorphantx=1000"], ["-maxorphantx=1000", "-limitancestorcount=5"]]
+ self.extra_args = [
+ ["-maxorphantx=1000"],
+ ["-maxorphantx=1000", "-limitancestorcount={}".format(MAX_ANCESTORS_CUSTOM)],
+ ]
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
@@ -188,7 +194,14 @@ class MempoolPackagesTest(BitcoinTestFramework):
assert_equal(mempool[x]['descendantfees'], descendant_fees * COIN + 2000)
assert_equal(mempool[x]['fees']['descendant'], descendant_fees+satoshi_round(0.00002))
- # TODO: check that node1's mempool is as expected
+ # Check that node1's mempool is as expected (-> custom ancestor limit)
+ mempool0 = self.nodes[0].getrawmempool(False)
+ mempool1 = self.nodes[1].getrawmempool(False)
+ assert_equal(len(mempool1), MAX_ANCESTORS_CUSTOM)
+ assert set(mempool1).issubset(set(mempool0))
+ for tx in chain[:MAX_ANCESTORS_CUSTOM]:
+ assert tx in mempool1
+ # TODO: more detailed check of node1's mempool (fees etc.)
# TODO: test ancestor size limits
diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py
index f0ceb8e6a3..20864881c1 100755
--- a/test/functional/p2p_invalid_messages.py
+++ b/test/functional/p2p_invalid_messages.py
@@ -4,7 +4,6 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid network messages."""
import asyncio
-import os
import struct
import sys
@@ -66,27 +65,21 @@ class InvalidMessagesTest(BitcoinTestFramework):
msg_at_size = msg_unrecognized(str_data="b" * valid_data_limit)
assert len(msg_at_size.serialize()) == msg_limit
- increase_allowed = 0.5
- if [s for s in os.environ.get("BITCOIN_CONFIG", "").split(" ") if "--with-sanitizers" in s and "address" in s]:
- increase_allowed = 3.5
- with node.assert_memory_usage_stable(increase_allowed=increase_allowed):
- self.log.info(
- "Sending a bunch of large, junk messages to test "
- "memory exhaustion. May take a bit...")
-
- # Run a bunch of times to test for memory exhaustion.
- for _ in range(80):
- node.p2p.send_message(msg_at_size)
-
- # Check that, even though the node is being hammered by nonsense from one
- # connection, it can still service other peers in a timely way.
- for _ in range(20):
- conn2.sync_with_ping(timeout=2)
-
- # Peer 1, despite serving up a bunch of nonsense, should still be connected.
- self.log.info("Waiting for node to drop junk messages.")
- node.p2p.sync_with_ping(timeout=320)
- assert node.p2p.is_connected
+ self.log.info("Sending a bunch of large, junk messages to test memory exhaustion. May take a bit...")
+
+ # Run a bunch of times to test for memory exhaustion.
+ for _ in range(80):
+ node.p2p.send_message(msg_at_size)
+
+ # Check that, even though the node is being hammered by nonsense from one
+ # connection, it can still service other peers in a timely way.
+ for _ in range(20):
+ conn2.sync_with_ping(timeout=2)
+
+ # Peer 1, despite serving up a bunch of nonsense, should still be connected.
+ self.log.info("Waiting for node to drop junk messages.")
+ node.p2p.sync_with_ping(timeout=320)
+ assert node.p2p.is_connected
#
# 1.
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index 0c7edbf434..fdb70097ee 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -1116,7 +1116,7 @@ class SegWitTest(BitcoinTestFramework):
MAX_PROGRAM_LENGTH = 10000
# This program is 19 max pushes (9937 bytes), then 64 more opcode-bytes.
- long_witness_program = CScript([b'a' * 520] * 19 + [OP_DROP] * 63 + [OP_TRUE])
+ long_witness_program = CScript([b'a' * MAX_SCRIPT_ELEMENT_SIZE] * 19 + [OP_DROP] * 63 + [OP_TRUE])
assert len(long_witness_program) == MAX_PROGRAM_LENGTH + 1
long_witness_hash = sha256(long_witness_program)
long_script_pubkey = CScript([OP_0, long_witness_hash])
@@ -1140,7 +1140,7 @@ class SegWitTest(BitcoinTestFramework):
test_witness_block(self.nodes[0], self.test_node, block, accepted=False)
# Try again with one less byte in the witness program
- witness_program = CScript([b'a' * 520] * 19 + [OP_DROP] * 62 + [OP_TRUE])
+ witness_program = CScript([b'a' * MAX_SCRIPT_ELEMENT_SIZE] * 19 + [OP_DROP] * 62 + [OP_TRUE])
assert len(witness_program) == MAX_PROGRAM_LENGTH
witness_hash = sha256(witness_program)
script_pubkey = CScript([OP_0, witness_hash])
diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py
index 41a9b50ea6..693051edc0 100755
--- a/test/functional/rpc_fundrawtransaction.py
+++ b/test/functional/rpc_fundrawtransaction.py
@@ -28,6 +28,9 @@ class RawTransactionsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 4
self.setup_clean_chain = True
+ # This test isn't testing tx relay. Set whitelist on the peers for
+ # instant tx relay.
+ self.extra_args = [['-whitelist=127.0.0.1']] * self.num_nodes
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
@@ -470,8 +473,7 @@ class RawTransactionsTest(BitcoinTestFramework):
# Send 1.2 BTC to msig addr.
self.nodes[0].sendtoaddress(mSigObj, 1.2)
- self.sync_all()
- self.nodes[1].generate(1)
+ self.nodes[0].generate(1)
self.sync_all()
oldBalance = self.nodes[1].getbalance()
@@ -482,8 +484,7 @@ class RawTransactionsTest(BitcoinTestFramework):
signedTx = self.nodes[2].signrawtransactionwithwallet(fundedTx['hex'])
self.nodes[2].sendrawtransaction(signedTx['hex'])
- self.sync_all()
- self.nodes[1].generate(1)
+ self.nodes[2].generate(1)
self.sync_all()
# Make sure funds are received at node1.
@@ -493,22 +494,6 @@ class RawTransactionsTest(BitcoinTestFramework):
self.log.info("Test fundrawtxn with locked wallet")
self.nodes[1].encryptwallet("test")
- self.stop_nodes()
-
- self.start_nodes()
- # This test is not meant to test fee estimation and we'd like
- # to be sure all txns are sent at a consistent desired feerate.
- for node in self.nodes:
- node.settxfee(self.min_relay_tx_fee)
-
- connect_nodes(self.nodes[0], 1)
- connect_nodes(self.nodes[1], 2)
- connect_nodes(self.nodes[0], 2)
- connect_nodes(self.nodes[0], 3)
- # Again lock the watchonly UTXO or nodes[0] may spend it, because
- # lockunspent is memory-only and thus lost on restart.
- self.nodes[0].lockunspent(False, [{"txid": self.watchonly_txid, "vout": self.watchonly_vout}])
- self.sync_all()
# Drain the keypool.
self.nodes[1].getnewaddress()
@@ -550,8 +535,7 @@ class RawTransactionsTest(BitcoinTestFramework):
# Empty node1, send some small coins from node0 to node1.
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), self.nodes[1].getbalance(), "", "", True)
- self.sync_all()
- self.nodes[0].generate(1)
+ self.nodes[1].generate(1)
self.sync_all()
for i in range(0,20):
@@ -579,8 +563,7 @@ class RawTransactionsTest(BitcoinTestFramework):
# Again, empty node1, send some small coins from node0 to node1.
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), self.nodes[1].getbalance(), "", "", True)
- self.sync_all()
- self.nodes[0].generate(1)
+ self.nodes[1].generate(1)
self.sync_all()
for i in range(0,20):
@@ -597,8 +580,7 @@ class RawTransactionsTest(BitcoinTestFramework):
fundedTx = self.nodes[1].fundrawtransaction(rawtx)
fundedAndSignedTx = self.nodes[1].signrawtransactionwithwallet(fundedTx['hex'])
self.nodes[1].sendrawtransaction(fundedAndSignedTx['hex'])
- self.sync_all()
- self.nodes[0].generate(1)
+ self.nodes[1].generate(1)
self.sync_all()
assert_equal(oldBalance+Decimal('50.19000000'), self.nodes[0].getbalance()) #0.19+block reward
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index c56c0d06ff..6b6bbfd1f9 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -596,6 +596,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
if not self.is_wallet_compiled():
raise SkipTest("wallet has not been compiled.")
+ def skip_if_no_wallet_tool(self):
+ """Skip the running test if bitcoin-wallet has not been compiled."""
+ if not self.is_wallet_tool_compiled():
+ raise SkipTest("bitcoin-wallet has not been compiled")
+
def skip_if_no_cli(self):
"""Skip the running test if bitcoin-cli has not been compiled."""
if not self.is_cli_compiled():
@@ -609,6 +614,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
"""Checks whether the wallet module was compiled."""
return self.config["components"].getboolean("ENABLE_WALLET")
+ def is_wallet_tool_compiled(self):
+ """Checks whether bitcoin-wallet was compiled."""
+ return self.config["components"].getboolean("ENABLE_WALLET_TOOL")
+
def is_zmq_compiled(self):
"""Checks whether the zmq module was compiled."""
return self.config["components"].getboolean("ENABLE_ZMQ")
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index d8bfdfd040..1c9628264f 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -135,25 +135,6 @@ class TestNode():
assert len(self.PRIV_KEYS) == MAX_NODES
return self.PRIV_KEYS[self.index]
- def get_mem_rss_kilobytes(self):
- """Get the memory usage (RSS) per `ps`.
-
- Returns None if `ps` is unavailable.
- """
- assert self.running
-
- try:
- return int(subprocess.check_output(
- ["ps", "h", "-o", "rss", "{}".format(self.process.pid)],
- stderr=subprocess.DEVNULL).split()[-1])
-
- # Avoid failing on platforms where ps isn't installed.
- #
- # We could later use something like `psutils` to work across platforms.
- except (FileNotFoundError, subprocess.SubprocessError):
- self.log.exception("Unable to get memory usage")
- return None
-
def _node_msg(self, msg: str) -> str:
"""Return a modified msg that identifies this node by its index as a debugging aid."""
return "[node %d] %s" % (self.index, msg)
@@ -333,33 +314,6 @@ class TestNode():
self._raise_assertion_error('Expected messages "{}" does not partially match log:\n\n{}\n\n'.format(str(expected_msgs), print_log))
@contextlib.contextmanager
- def assert_memory_usage_stable(self, *, increase_allowed=0.03):
- """Context manager that allows the user to assert that a node's memory usage (RSS)
- hasn't increased beyond some threshold percentage.
-
- Args:
- increase_allowed (float): the fractional increase in memory allowed until failure;
- e.g. `0.12` for up to 12% increase allowed.
- """
- before_memory_usage = self.get_mem_rss_kilobytes()
-
- yield
-
- after_memory_usage = self.get_mem_rss_kilobytes()
-
- if not (before_memory_usage and after_memory_usage):
- self.log.warning("Unable to detect memory usage (RSS) - skipping memory check.")
- return
-
- perc_increase_memory_usage = (after_memory_usage / before_memory_usage) - 1
-
- if perc_increase_memory_usage > increase_allowed:
- self._raise_assertion_error(
- "Memory usage increased over threshold of {:.3f}% from {} to {} ({:.3f}%)".format(
- increase_allowed * 100, before_memory_usage, after_memory_usage,
- perc_increase_memory_usage * 100))
-
- @contextlib.contextmanager
def profile_with_perf(self, profile_name):
"""
Context manager that allows easy profiling of node activity using `perf`.
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 9b4a5d2030..4156e22720 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -364,9 +364,10 @@ def main():
def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, runs_ci, use_term_control):
args = args or []
- # Warn if bitcoind is already running (unix only)
+ # Warn if bitcoind is already running
+ # pidof might fail or return an empty string if bitcoind is not running
try:
- if subprocess.check_output(["pidof", "bitcoind"]) is not None:
+ if subprocess.check_output(["pidof", "bitcoind"]) not in [b'']:
print("%sWARNING!%s There is already a bitcoind process running on this system. Tests may fail unexpectedly due to resource contention!" % (BOLD[1], BOLD[0]))
except (OSError, subprocess.SubprocessError):
pass
diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py
index 355cd7af75..32ef257456 100755
--- a/test/functional/tool_wallet.py
+++ b/test/functional/tool_wallet.py
@@ -23,6 +23,7 @@ class ToolWalletTest(BitcoinTestFramework):
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
+ self.skip_if_no_wallet_tool()
def bitcoin_wallet_process(self, *args):
binary = self.config["environment"]["BUILDDIR"] + '/src/bitcoin-wallet' + self.config["environment"]["EXEEXT"]
diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py
index 3c8064ea2d..16925ea753 100755
--- a/test/functional/wallet_avoidreuse.py
+++ b/test/functional/wallet_avoidreuse.py
@@ -68,6 +68,9 @@ class AvoidReuseTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = False
self.num_nodes = 2
+ # This test isn't testing txn relay/timing, so set whitelist on the
+ # peers for instant txn relay. This speeds up the test run time 2-3x.
+ self.extra_args = [["-whitelist=127.0.0.1"]] * self.num_nodes
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
@@ -87,6 +90,8 @@ class AvoidReuseTest(BitcoinTestFramework):
def test_persistence(self):
'''Test that wallet files persist the avoid_reuse flag.'''
+ self.log.info("Test wallet files persist avoid_reuse flag")
+
# Configure node 1 to use avoid_reuse
self.nodes[1].setwalletflag('avoid_reuse')
@@ -109,6 +114,8 @@ class AvoidReuseTest(BitcoinTestFramework):
def test_immutable(self):
'''Test immutable wallet flags'''
+ self.log.info("Test immutable wallet flags")
+
# Attempt to set the disable_private_keys flag; this should not work
assert_raises_rpc_error(-8, "Wallet flag is immutable", self.nodes[1].setwalletflag, 'disable_private_keys')
@@ -130,6 +137,7 @@ class AvoidReuseTest(BitcoinTestFramework):
the avoid_reuse flag set to false. This means the 10 BTC send should succeed,
where it fails in test_fund_send_fund_send.
'''
+ self.log.info("Test fund send fund send dirty")
fundaddr = self.nodes[1].getnewaddress()
retaddr = self.nodes[0].getnewaddress()
@@ -183,6 +191,7 @@ class AvoidReuseTest(BitcoinTestFramework):
[1] tries to spend 10 BTC (fails; dirty).
[1] tries to spend 4 BTC (succeeds; change address sufficient)
'''
+ self.log.info("Test fund send fund send")
fundaddr = self.nodes[1].getnewaddress()
retaddr = self.nodes[0].getnewaddress()
diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py
index 95d51adebb..9d6aa36c35 100755
--- a/test/functional/wallet_bumpfee.py
+++ b/test/functional/wallet_bumpfee.py
@@ -211,15 +211,15 @@ def test_small_output_with_feerate_succeeds(rbf_node, dest_address):
# Make sure additional inputs exist
rbf_node.generatetoaddress(101, rbf_node.getnewaddress())
rbfid = spend_one_input(rbf_node, dest_address)
- original_input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]
- assert_equal(len(original_input_list), 1)
- original_txin = original_input_list[0]
+ input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]
+ assert_equal(len(input_list), 1)
+ original_txin = input_list[0]
# Keep bumping until we out-spend change output
tx_fee = 0
while tx_fee < Decimal("0.0005"):
- new_input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]
- new_item = list(new_input_list)[0]
- assert_equal(len(original_input_list), 1)
+ input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]
+ new_item = list(input_list)[0]
+ assert_equal(len(input_list), 1)
assert_equal(original_txin["txid"], new_item["txid"])
assert_equal(original_txin["vout"], new_item["vout"])
rbfid_new_details = rbf_node.bumpfee(rbfid)
diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py
index 5e94068930..efa6a199ad 100755
--- a/test/functional/wallet_listreceivedby.py
+++ b/test/functional/wallet_listreceivedby.py
@@ -19,6 +19,7 @@ class ReceivedByTest(BitcoinTestFramework):
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
+ self.skip_if_no_cli()
def run_test(self):
# Generate block to get out of IBD
diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py
index 455e89e310..6f248c9bd3 100755
--- a/test/functional/wallet_listsinceblock.py
+++ b/test/functional/wallet_listsinceblock.py
@@ -40,6 +40,7 @@ class ListSinceBlockTest(BitcoinTestFramework):
def test_no_blockhash(self):
txid = self.nodes[2].sendtoaddress(self.nodes[0].getnewaddress(), 1)
blockhash, = self.nodes[2].generate(1)
+ blockheight = self.nodes[2].getblockheader(blockhash)['height']
self.sync_all()
txs = self.nodes[0].listtransactions()
@@ -47,6 +48,7 @@ class ListSinceBlockTest(BitcoinTestFramework):
"category": "receive",
"amount": 1,
"blockhash": blockhash,
+ "blockheight": blockheight,
"confirmations": 1,
})
assert_equal(
@@ -276,7 +278,8 @@ class ListSinceBlockTest(BitcoinTestFramework):
self.sync_all()
# gettransaction should work for txid1
- self.nodes[0].gettransaction(txid1)
+ tx1 = self.nodes[0].gettransaction(txid1)
+ assert_equal(tx1['blockheight'], self.nodes[0].getblockheader(tx1['blockhash'])['height'])
# listsinceblock(lastblockhash) should now include txid1 in transactions
# as well as in removed
diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py
index 997d6e702c..8c44a070b8 100755
--- a/test/functional/wallet_listtransactions.py
+++ b/test/functional/wallet_listtransactions.py
@@ -40,14 +40,15 @@ class ListTransactionsTest(BitcoinTestFramework):
{"txid": txid},
{"category": "receive", "amount": Decimal("0.1"), "confirmations": 0})
# mine a block, confirmations should change:
- self.nodes[0].generate(1)
+ blockhash = self.nodes[0].generate(1)[0]
+ blockheight = self.nodes[0].getblockheader(blockhash)['height']
self.sync_all()
assert_array_result(self.nodes[0].listtransactions(),
{"txid": txid},
- {"category": "send", "amount": Decimal("-0.1"), "confirmations": 1})
+ {"category": "send", "amount": Decimal("-0.1"), "confirmations": 1, "blockhash": blockhash, "blockheight": blockheight})
assert_array_result(self.nodes[1].listtransactions(),
{"txid": txid},
- {"category": "receive", "amount": Decimal("0.1"), "confirmations": 1})
+ {"category": "receive", "amount": Decimal("0.1"), "confirmations": 1, "blockhash": blockhash, "blockheight": blockheight})
# send-to-self:
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 0.2)
diff --git a/test/fuzz/test_runner.py b/test/fuzz/test_runner.py
index f19cf924d2..fde99fe496 100755
--- a/test/fuzz/test_runner.py
+++ b/test/fuzz/test_runner.py
@@ -78,7 +78,7 @@ def main():
os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', test_list_selection[0]),
'-help=1',
],
- timeout=1,
+ timeout=10,
check=True,
stderr=subprocess.PIPE,
universal_newlines=True,
diff --git a/test/lint/lint-circular-dependencies.sh b/test/lint/lint-circular-dependencies.sh
index ccd12b5823..7164432ca5 100755
--- a/test/lint/lint-circular-dependencies.sh
+++ b/test/lint/lint-circular-dependencies.sh
@@ -18,18 +18,14 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
"qt/bitcoingui -> qt/walletframe -> qt/bitcoingui"
"qt/bitcoingui -> qt/walletview -> qt/bitcoingui"
"qt/clientmodel -> qt/peertablemodel -> qt/clientmodel"
- "qt/paymentserver -> qt/walletmodel -> qt/paymentserver"
"qt/recentrequeststablemodel -> qt/walletmodel -> qt/recentrequeststablemodel"
"qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog"
"qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel"
- "qt/walletmodel -> qt/walletmodeltransaction -> qt/walletmodel"
"txmempool -> validation -> txmempool"
"wallet/coincontrol -> wallet/wallet -> wallet/coincontrol"
"wallet/fees -> wallet/wallet -> wallet/fees"
"wallet/wallet -> wallet/walletdb -> wallet/wallet"
"policy/fees -> txmempool -> validation -> policy/fees"
- "qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/guiutil"
- "txmempool -> validation -> validationinterface -> txmempool"
"wallet/scriptpubkeyman -> wallet/wallet -> wallet/scriptpubkeyman"
)
diff --git a/test/lint/lint-python.sh b/test/lint/lint-python.sh
index 3c82ec19e3..2b1a1d8fbc 100755
--- a/test/lint/lint-python.sh
+++ b/test/lint/lint-python.sh
@@ -82,10 +82,10 @@ enabled=(
)
if ! command -v flake8 > /dev/null; then
- echo "Skipping Python linting since flake8 is not installed. Install by running \"pip3 install flake8\""
+ echo "Skipping Python linting since flake8 is not installed."
exit 0
elif PYTHONWARNINGS="ignore" flake8 --version | grep -q "Python 2"; then
- echo "Skipping Python linting since flake8 is running under Python 2. Install the Python 3 version of flake8 by running \"pip3 install flake8\""
+ echo "Skipping Python linting since flake8 is running under Python 2. Install the Python 3 version of flake8."
exit 0
fi
diff --git a/test/sanitizer_suppressions/lsan b/test/sanitizer_suppressions/lsan
index 90a92a5115..d2cb618d4e 100644
--- a/test/sanitizer_suppressions/lsan
+++ b/test/sanitizer_suppressions/lsan
@@ -1,5 +1,4 @@
# Suppress warnings triggered in dependencies
-leak:libcrypto
leak:libqminimal
leak:libQt5Core
leak:libQt5Gui