From fa8ce3b670dd9376d2c13722670b9cc8012011ca Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 16 Apr 2016 19:11:39 +0200 Subject: [PATCH] [qa] assert 'changePosition out of bounds' --- qa/rpc-tests/fundrawtransaction.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qa/rpc-tests/fundrawtransaction.py b/qa/rpc-tests/fundrawtransaction.py index 228574e67..3dfb9e402 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];