Skip to content

Commit 315fd4d

Browse files
committed
test: Test for out of bounds vout in sendall
1 parent b132c85 commit 315fd4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/functional/wallet_sendall.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ def sendall_fails_on_missing_input(self):
221221
self.add_utxos([16, 5])
222222
spent_utxo = self.wallet.listunspent()[0]
223223

224+
# fails on out of bounds vout
225+
assert_raises_rpc_error(-8,
226+
"Input not found. UTXO ({}:{}) is not part of wallet.".format(spent_utxo["txid"], 1000),
227+
self.wallet.sendall, recipients=[self.remainder_target], options={"inputs": [{"txid": spent_utxo["txid"], "vout": 1000}]})
228+
224229
# fails on unconfirmed spent UTXO
225230
self.wallet.sendall(recipients=[self.remainder_target])
226231
assert_raises_rpc_error(-8,

0 commit comments

Comments
 (0)