aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-09 09:24:19 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-09 09:24:22 +0100
commit529ed3336205e30d94e741a4eb93dd945ad518e7 (patch)
treefd456921be0ca66e4043d58dce8085b29ff0ac2e /test
parent68ca8677e039a60b9f51938987d784cb58a3c995 (diff)
parent84bc35d7a5b91c50cb58ff844e7fc7d9f026cc76 (diff)
downloadbitcoin-529ed3336205e30d94e741a4eb93dd945ad518e7.tar.xz
Merge bitcoin/bitcoin#23715: test: feature_rbf.py: check specified wallet type availability
84bc35d7a5b91c50cb58ff844e7fc7d9f026cc76 test: feature_rbf.py: check specified wallet type availability (Sebastian Falbesoner) Pull request description: The test currently leads to a failure if in general wallet support is compiled, but the library for the specified type (BDB/SQLite) is not, i.e. if started with the `--legacy-wallet` parameter, but bitcoind is compiled without BDB support, see e.g. https://github.com/bitcoin/bitcoin/pull/23682#issuecomment-989044207 Fix this by checking if the specified wallet type (BDB for legacy wallet, SQLite for descriptor wallet) is available. Also move the helper `is_specified_wallet_compiled()` to the test framework's class BitcoinTestFramework first, so it can be reused. Should further pave the way for #23682. On my local instance without BDB compiled, all targets in test_runner pass now. ACKs for top commit: mzumsande: ACK 84bc35d7a5b91c50cb58ff844e7fc7d9f026cc76, changes loook good for me and I confirmed that this fixes the error encountered on master when running the test `--without-bdb`. Tree-SHA512: 1575c03c793c8e0ac195d0914eff75d02604301c8fb77d0fdb7c0b245561569c0c7db387ef4de499044b68ab6e14b4b78b955f6e74c84197bcaed95f439c9824
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_rbf.py2
-rwxr-xr-xtest/functional/interface_bitcoin_cli.py6
-rwxr-xr-xtest/functional/test_framework/test_framework.py8
3 files changed, 9 insertions, 7 deletions
diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py
index e540cc1574..5722e71c7a 100755
--- a/test/functional/feature_rbf.py
+++ b/test/functional/feature_rbf.py
@@ -538,7 +538,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
assert_equal(json0["vin"][0]["sequence"], 4294967293)
assert_equal(json1["vin"][0]["sequence"], 4294967295)
- if self.is_wallet_compiled():
+ if self.is_specified_wallet_compiled():
self.init_wallet(node=0)
rawtx2 = self.nodes[0].createrawtransaction([], outs)
frawtx2a = self.nodes[0].fundrawtransaction(rawtx2, {"replaceable": True})
diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py
index 034edd709e..2ea9ebfc98 100755
--- a/test/functional/interface_bitcoin_cli.py
+++ b/test/functional/interface_bitcoin_cli.py
@@ -66,12 +66,6 @@ def cli_get_info_string_to_dict(cli_get_info_string):
class TestBitcoinCli(BitcoinTestFramework):
- def is_specified_wallet_compiled(self):
- if self.options.descriptors:
- return self.is_sqlite_compiled()
- else:
- return self.is_bdb_compiled()
-
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 6746fbf9f9..8f75255caf 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -886,6 +886,14 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
"""Checks whether the wallet module was compiled."""
return self.config["components"].getboolean("ENABLE_WALLET")
+ def is_specified_wallet_compiled(self):
+ """Checks whether wallet support for the specified type
+ (legacy or descriptor wallet) was compiled."""
+ if self.options.descriptors:
+ return self.is_sqlite_compiled()
+ else:
+ return self.is_bdb_compiled()
+
def is_wallet_tool_compiled(self):
"""Checks whether bitcoin-wallet was compiled."""
return self.config["components"].getboolean("ENABLE_WALLET_TOOL")