diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-06-12 21:36:05 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-06-22 21:57:04 -0400 |
commit | 754f134a50cc56cdf0baf996d909c992770fcc97 (patch) | |
tree | 6254beb3d43175e1383014a1f80daa10c60b42cc /test/functional/wallet_keypool.py | |
parent | 87a0e7a3b7c0ffd545e537bd497cdc3e67d045f6 (diff) | |
download | bitcoin-754f134a50cc56cdf0baf996d909c992770fcc97.tar.xz |
wallet: Add error message to GetReservedDestination
Adds an error output parameter to all GetReservedDestination functions
so that callers can get the actual reason that a change address could
not be fetched. This more closely matches GetNewDestination. This allows
for more granular error messages, such as one that indicates that
bech32m addresses cannot be generated yet.
Diffstat (limited to 'test/functional/wallet_keypool.py')
-rwxr-xr-x | test/functional/wallet_keypool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py index 3fe6adeebc..28bfc9116f 100755 --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -161,7 +161,7 @@ class KeyPoolTest(BitcoinTestFramework): # Using a fee rate (10 sat / byte) well above the minimum relay rate # creating a 5,000 sat transaction with change should not be possible - assert_raises_rpc_error(-4, "Transaction needs a change address, but we can't generate it. Please call keypoolrefill first.", w2.walletcreatefundedpsbt, inputs=[], outputs=[{addr.pop(): 0.00005000}], options={"subtractFeeFromOutputs": [0], "feeRate": 0.00010}) + assert_raises_rpc_error(-4, "Transaction needs a change address, but we can't generate it.", w2.walletcreatefundedpsbt, inputs=[], outputs=[{addr.pop(): 0.00005000}], options={"subtractFeeFromOutputs": [0], "feeRate": 0.00010}) # creating a 10,000 sat transaction without change, with a manual input, should still be possible res = w2.walletcreatefundedpsbt(inputs=w2.listunspent(), outputs=[{destination: 0.00010000}], options={"subtractFeeFromOutputs": [0], "feeRate": 0.00010}) |