Skip to content

Commit

Permalink
test: call keypoolrefill with private keys disabled should throw an…
Browse files Browse the repository at this point in the history
… error
  • Loading branch information
brunoerg committed Dec 19, 2022
1 parent cb32328 commit ec63a48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/wallet_keypool.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def run_test(self):
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()

0 comments on commit ec63a48

Please sign in to comment.