aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-04-16 19:11:39 +0200
committerMarcoFalke <falke.marco@gmail.com>2016-06-17 15:19:02 +0200
commitfa8ce3b670dd9376d2c13722670b9cc8012011ca (patch)
tree32654ead3a78e3db0cd37d1af7b6e5578b76b7c3 /qa
parent66db2d62d59817320c9182fc18e75a93b76828ea (diff)
[qa] assert 'changePosition out of bounds'
Diffstat (limited to 'qa')
-rwxr-xr-xqa/rpc-tests/fundrawtransaction.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/qa/rpc-tests/fundrawtransaction.py b/qa/rpc-tests/fundrawtransaction.py
index 228574e671..3dfb9e4024 100755
--- a/qa/rpc-tests/fundrawtransaction.py
+++ b/qa/rpc-tests/fundrawtransaction.py
@@ -247,6 +247,12 @@ class RawTransactionsTest(BitcoinTestFramework):
assert_equal(utx['txid'], dec_tx['vin'][0]['txid'])
change = self.nodes[2].getnewaddress()
+ try:
+ rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 2})
+ except JSONRPCException as e:
+ assert('changePosition out of bounds' == e.error['message'])
+ else:
+ assert(False)
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 0})
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
out = dec_tx['vout'][0];