diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-04-14 14:40:06 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-04-14 14:42:34 -0400 |
commit | 88376c623cff3602d04ec6c94a89552aefa20fa7 (patch) | |
tree | d71040e971e359530c60a0083261272807593cfc | |
parent | 17ab31aa46f7b5c265d07091fe45671ef2af6a9a (diff) | |
download | bitcoin-88376c623cff3602d04ec6c94a89552aefa20fa7.tar.xz |
test: Test for disabling wallet flags
-rwxr-xr-x | test/functional/wallet_avoidreuse.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py index dc823c2c60..f663666f57 100755 --- a/test/functional/wallet_avoidreuse.py +++ b/test/functional/wallet_avoidreuse.py @@ -118,6 +118,17 @@ 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) + # 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") + assert_equal(w.getwalletinfo()["avoid_reuse"], True) + w.setwalletflag("avoid_reuse", False) + assert_equal(w.getwalletinfo()["avoid_reuse"], False) + w.unloadwallet() + self.nodes[1].loadwallet("avoid_reuse_persist") + assert_equal(w.getwalletinfo()["avoid_reuse"], False) + w.unloadwallet() + def test_immutable(self): '''Test immutable wallet flags''' self.log.info("Test immutable wallet flags") |