|
|
@ -247,6 +247,12 @@ class RawTransactionsTest(BitcoinTestFramework): |
|
|
|
assert_equal(utx['txid'], dec_tx['vin'][0]['txid']) |
|
|
|
assert_equal(utx['txid'], dec_tx['vin'][0]['txid']) |
|
|
|
|
|
|
|
|
|
|
|
change = self.nodes[2].getnewaddress() |
|
|
|
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}) |
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 0}) |
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex']) |
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex']) |
|
|
|
out = dec_tx['vout'][0]; |
|
|
|
out = dec_tx['vout'][0]; |
|
|
|