test: Test for out of bounds vout in sendall

Github-Pull: #26344
Rebased-From: 315fd4dbab
This commit is contained in:
Andrew Chow 2022-10-20 13:25:13 -04:00 committed by fanquake
parent dedee6af57
commit b04f5f9608
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -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,