Changeset View
Changeset View
Standalone View
Standalone View
test/functional/fundrawtransaction.py
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
matchingOuts += 1 | matchingOuts += 1 | ||||
assert_equal(matchingOuts, 2) | assert_equal(matchingOuts, 2) | ||||
assert_equal(len(dec_tx['vout']), 3) | assert_equal(len(dec_tx['vout']), 3) | ||||
# | # | ||||
# test a fundrawtransaction with invalid vin # | # test a fundrawtransaction with invalid vin # | ||||
# | # | ||||
listunspent = self.nodes[2].listunspent() | |||||
inputs = [ | inputs = [ | ||||
{'txid': "1c7f966dab21119bac53213a2bc7532bff1fa844c124fd750a7d0b1332440bd1", 'vout': 0}] | {'txid': "1c7f966dab21119bac53213a2bc7532bff1fa844c124fd750a7d0b1332440bd1", 'vout': 0}] | ||||
# invalid vin! | # invalid vin! | ||||
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) | dec_tx = self.nodes[2].decoderawtransaction(rawtx) | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
▲ Show 20 Lines • Show All 449 Lines • Show Last 20 Lines |