test: call keypoolrefill with private keys disabled should throw an error

This commit is contained in:
brunoerg 2022-12-18 17:21:46 -03:00
parent cb32328d1b
commit ec63a4892e

View File

@ -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()