aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-29 11:46:53 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-29 11:46:56 +0100
commit3b6e0f0345a5e7b437881f651d9b4e0881f7fd5e (patch)
tree0d55477df20998f6a1069e1814f7daf5ef0e950b
parentb9028b2e263a567f47c5261e5961c76ea093fbf0 (diff)
parent3666a06730b2229e5af24124e6ef0403e4a6792e (diff)
downloadbitcoin-3b6e0f0345a5e7b437881f651d9b4e0881f7fd5e.tar.xz
Merge bitcoin/bitcoin#26738: test: add coverage for unknown wallet flag in `setwalletflag`
3666a06730b2229e5af24124e6ef0403e4a6792e test: add coverage for unknown wallet flag in `setwalletflag` (brunoerg) Pull request description: This PR adds test coverage for the following error: https://github.com/bitcoin/bitcoin/blob/6d40a1a7e7f09ff2c32e53237f968adf8300d028/src/wallet/rpc/wallet.cpp#L275-L277 https://marcofalke.github.io/btc_cov/total.coverage/src/wallet/rpc/wallet.cpp.gcov.html ACKs for top commit: aureleoules: ACK 3666a06730b2229e5af24124e6ef0403e4a6792e Tree-SHA512: b6b2415442dfbc2404aed9720cc899995686007d6ba222dae461d064e4454d5af1326d3d527770b51b1005721ac42a49972f1eabf21108f656c30d3584790747
-rwxr-xr-xtest/functional/wallet_avoidreuse.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py
index 402cb387c1..4fb0559a33 100755
--- a/test/functional/wallet_avoidreuse.py
+++ b/test/functional/wallet_avoidreuse.py
@@ -120,6 +120,8 @@ class AvoidReuseTest(BitcoinTestFramework):
assert_raises_rpc_error(-8, "Wallet flag is already set to false", self.nodes[0].setwalletflag, 'avoid_reuse', False)
assert_raises_rpc_error(-8, "Wallet flag is already set to true", self.nodes[1].setwalletflag, 'avoid_reuse', True)
+ assert_raises_rpc_error(-8, "Unknown wallet flag: abc", self.nodes[0].setwalletflag, 'abc', True)
+
# Create a wallet with avoid reuse, and test that disabling it afterwards persists
self.nodes[1].createwallet(wallet_name="avoid_reuse_persist", avoid_reuse=True)
w = self.nodes[1].get_wallet_rpc("avoid_reuse_persist")