diff options
author | Andrew Chow <github@achow101.com> | 2022-10-20 13:25:13 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-10-20 13:25:13 -0400 |
commit | 315fd4dbabb6b631b755811742a3bdf93e1241bf (patch) | |
tree | 2563e40e021fbccd7e1d655c52a56faadcf60d4a | |
parent | b132c85650afb2182f2e58e903f3d6f86fd3fb22 (diff) | |
download | bitcoin-315fd4dbabb6b631b755811742a3bdf93e1241bf.tar.xz |
test: Test for out of bounds vout in sendall
-rwxr-xr-x | test/functional/wallet_sendall.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/wallet_sendall.py b/test/functional/wallet_sendall.py index 3b8835e810..4fe11455b1 100755 --- a/test/functional/wallet_sendall.py +++ b/test/functional/wallet_sendall.py @@ -221,6 +221,11 @@ class SendallTest(BitcoinTestFramework): self.add_utxos([16, 5]) spent_utxo = self.wallet.listunspent()[0] + # fails on out of bounds vout + assert_raises_rpc_error(-8, + "Input not found. UTXO ({}:{}) is not part of wallet.".format(spent_utxo["txid"], 1000), + self.wallet.sendall, recipients=[self.remainder_target], options={"inputs": [{"txid": spent_utxo["txid"], "vout": 1000}]}) + # fails on unconfirmed spent UTXO self.wallet.sendall(recipients=[self.remainder_target]) assert_raises_rpc_error(-8, |