From ec63a4892e67fdc6c0c464e6d4cffcd3eb48941c Mon Sep 17 00:00:00 2001 From: brunoerg Date: Sun, 18 Dec 2022 17:21:46 -0300 Subject: test: call `keypoolrefill` with private keys disabled should throw an error --- test/functional/wallet_keypool.py | 3 +++ 1 file changed, 3 insertions(+) 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() -- cgit v1.2.3