Skip to content

Commit 8ab1923

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26723: test: call keypoolrefill with priv key disabled should throw an error
ec63a48 test: call `keypoolrefill` with private keys disabled should throw an error (brunoerg) Pull request description: This PR adds test coverage for the following error: https://github.com/bitcoin/bitcoin/blob/cb32328d1b80d0ccd6eb9532bd8fe4e0a4de385e/src/wallet/rpc/addresses.cpp#L332-L334 ACKs for top commit: aureleoules: ACK ec63a48 Tree-SHA512: b5deda8981ff472f290e6e16c8723a58e02cbe099afd1f672c099f4add0a1d9b192b11a2c3f0e11b96794671f6b9efa75812b7a174248d7c58d7fd7d3310e7b9
2 parents 3d97496 + ec63a48 commit 8ab1923

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/wallet_keypool.py

+3
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)