Skip to content

Commit fa8ce3b

Browse files
author
MarcoFalke
committed
[qa] assert 'changePosition out of bounds'
1 parent 66db2d6 commit fa8ce3b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

qa/rpc-tests/fundrawtransaction.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ def run_test(self):
247247
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
248248

249249
change = self.nodes[2].getnewaddress()
250+
try:
251+
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 2})
252+
except JSONRPCException as e:
253+
assert('changePosition out of bounds' == e.error['message'])
254+
else:
255+
assert(False)
250256
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 0})
251257
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
252258
out = dec_tx['vout'][0];

0 commit comments

Comments
 (0)