Skip to content

Commit 3b6e0f0

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26738: test: add coverage for unknown wallet flag in setwalletflag
3666a06 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 3666a06 Tree-SHA512: b6b2415442dfbc2404aed9720cc899995686007d6ba222dae461d064e4454d5af1326d3d527770b51b1005721ac42a49972f1eabf21108f656c30d3584790747
2 parents b9028b2 + 3666a06 commit 3b6e0f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/functional/wallet_avoidreuse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def test_persistence(self):
120120
assert_raises_rpc_error(-8, "Wallet flag is already set to false", self.nodes[0].setwalletflag, 'avoid_reuse', False)
121121
assert_raises_rpc_error(-8, "Wallet flag is already set to true", self.nodes[1].setwalletflag, 'avoid_reuse', True)
122122

123+
assert_raises_rpc_error(-8, "Unknown wallet flag: abc", self.nodes[0].setwalletflag, 'abc', True)
124+
123125
# Create a wallet with avoid reuse, and test that disabling it afterwards persists
124126
self.nodes[1].createwallet(wallet_name="avoid_reuse_persist", avoid_reuse=True)
125127
w = self.nodes[1].get_wallet_rpc("avoid_reuse_persist")

0 commit comments

Comments
 (0)