Skip to content

Commit af0e14d

Browse files
committed
merge bitcoin#26723: call keypoolrefill with priv key disabled should throw an error
1 parent b91c5b9 commit af0e14d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/wallet_keypool_hd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,9 @@ def run_test(self):
223223
res = w2.walletcreatefundedpsbt(inputs=[], outputs=[{destination: 0.00010000}], options={"subtractFeeFromOutputs": [0], "feeRate": 0.000010, "changeAddress": addr.pop()})
224224
assert_equal("psbt" in res, True)
225225

226+
if not self.options.descriptors:
227+
msg = "Error: Private keys are disabled for this wallet"
228+
assert_raises_rpc_error(-4, msg, w2.keypoolrefill, 100)
229+
226230
if __name__ == '__main__':
227231
KeyPoolTest().main()

0 commit comments

Comments
 (0)