diff options
author | brunoerg <brunoely.gc@gmail.com> | 2022-12-18 17:21:46 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2022-12-18 22:00:38 -0300 |
commit | ec63a4892e67fdc6c0c464e6d4cffcd3eb48941c (patch) | |
tree | b055ddbfe19e00e0dd874ce615aae70ce199a51e | |
parent | cb32328d1b80d0ccd6eb9532bd8fe4e0a4de385e (diff) | |
download | bitcoin-ec63a4892e67fdc6c0c464e6d4cffcd3eb48941c.tar.xz |
test: call `keypoolrefill` with private keys disabled should throw an error
-rwxr-xr-x | test/functional/wallet_keypool.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py index aa31757f35..8b485a9324 100755 --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -204,6 +204,9 @@ class KeyPoolTest(BitcoinTestFramework): res = w2.walletcreatefundedpsbt(inputs=[], outputs=[{destination: 0.00010000}], options={"subtractFeeFromOutputs": [0], "feeRate": 0.00010, "changeAddress": addr.pop()}) assert_equal("psbt" in res, True) + if not self.options.descriptors: + msg = "Error: Private keys are disabled for this wallet" + assert_raises_rpc_error(-4, msg, w2.keypoolrefill, 100) if __name__ == '__main__': KeyPoolTest().main() |