|
|
@ -183,7 +183,6 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
inputs = [ ]
|
|
|
|
inputs = [ ]
|
|
|
|
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
|
|
|
outputs = { self.nodes[0].getnewaddress() : 1.0 }
|
|
|
|
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
|
|
|
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
|
|
|
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
assert len(dec_tx['vin']) > 0 #test that we have enough inputs
|
|
|
|
assert len(dec_tx['vin']) > 0 #test that we have enough inputs
|
|
|
@ -193,8 +192,6 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
inputs = [ ]
|
|
|
|
inputs = [ ]
|
|
|
|
outputs = { self.nodes[0].getnewaddress() : 2.2 }
|
|
|
|
outputs = { self.nodes[0].getnewaddress() : 2.2 }
|
|
|
|
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
|
|
|
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
assert len(dec_tx['vin']) > 0 #test if we have enough inputs
|
|
|
|
assert len(dec_tx['vin']) > 0 #test if we have enough inputs
|
|
|
@ -206,7 +203,6 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
inputs = [ ]
|
|
|
|
inputs = [ ]
|
|
|
|
outputs = { self.nodes[0].getnewaddress() : 2.6, self.nodes[1].getnewaddress() : 2.5 }
|
|
|
|
outputs = { self.nodes[0].getnewaddress() : 2.6, self.nodes[1].getnewaddress() : 2.5 }
|
|
|
|
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
|
|
|
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtx)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
@ -364,7 +360,6 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
# Should fail without add_inputs:
|
|
|
|
# Should fail without add_inputs:
|
|
|
|
assert_raises_rpc_error(-4, ERR_NOT_ENOUGH_PRESET_INPUTS, self.nodes[2].fundrawtransaction, rawtx, add_inputs=False)
|
|
|
|
assert_raises_rpc_error(-4, ERR_NOT_ENOUGH_PRESET_INPUTS, self.nodes[2].fundrawtransaction, rawtx, add_inputs=False)
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, add_inputs=True)
|
|
|
|
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, add_inputs=True)
|
|
|
|
|
|
|
|
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
|
|
|
|
totalOut = 0
|
|
|
|
totalOut = 0
|
|
|
|
matchingOuts = 0
|
|
|
|
matchingOuts = 0
|
|
|
|