Skip to content

Commit ec63a48

Browse files
committed
test: call keypoolrefill with private keys disabled should throw an error
1 parent cb32328 commit ec63a48

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/wallet_keypool.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ def run_test(self):
204204
res = w2.walletcreatefundedpsbt(inputs=[], outputs=[{destination: 0.00010000}], options={"subtractFeeFromOutputs": [0], "feeRate": 0.00010, "changeAddress": addr.pop()})
205205
assert_equal("psbt" in res, True)
206206

207+
if not self.options.descriptors:
208+
msg = "Error: Private keys are disabled for this wallet"
209+
assert_raises_rpc_error(-4, msg, w2.keypoolrefill, 100)
207210

208211
if __name__ == '__main__':
209212
KeyPoolTest().main()

0 commit comments

Comments
 (0)