Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_rawtransaction.py
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
inputs = [{"txid": txId, "vout": vout['n'], "scriptPubKey": vout['scriptPubKey'] | inputs = [{"txid": txId, "vout": vout['n'], "scriptPubKey": vout['scriptPubKey'] | ||||
['hex'], "redeemScript": mSigObjValid['hex'], "amount": vout['value']}] | ['hex'], "redeemScript": mSigObjValid['hex'], "amount": vout['value']}] | ||||
outputs = {self.nodes[0].getnewaddress(): 2.19} | outputs = {self.nodes[0].getnewaddress(): 2.19} | ||||
rawTx2 = self.nodes[2].createrawtransaction(inputs, outputs) | rawTx2 = self.nodes[2].createrawtransaction(inputs, outputs) | ||||
rawTxPartialSigned1 = self.nodes[1].signrawtransactionwithwallet( | rawTxPartialSigned1 = self.nodes[1].signrawtransactionwithwallet( | ||||
rawTx2, inputs) | rawTx2, inputs) | ||||
self.log.debug(rawTxPartialSigned1) | self.log.debug(rawTxPartialSigned1) | ||||
# node1 only has one key, can't comp. sign the tx | # node1 only has one key, can't comp. sign the tx | ||||
assert_equal(rawTxPartialSigned['complete'], False) | assert_equal(rawTxPartialSigned1['complete'], False) | ||||
rawTxPartialSigned2 = self.nodes[2].signrawtransactionwithwallet( | rawTxPartialSigned2 = self.nodes[2].signrawtransactionwithwallet( | ||||
rawTx2, inputs) | rawTx2, inputs) | ||||
self.log.debug(rawTxPartialSigned2) | self.log.debug(rawTxPartialSigned2) | ||||
# node2 only has one key, can't comp. sign the tx | # node2 only has one key, can't comp. sign the tx | ||||
assert_equal(rawTxPartialSigned2['complete'], False) | assert_equal(rawTxPartialSigned2['complete'], False) | ||||
rawTxComb = self.nodes[2].combinerawtransaction( | rawTxComb = self.nodes[2].combinerawtransaction( | ||||
[rawTxPartialSigned1['hex'], rawTxPartialSigned2['hex']]) | [rawTxPartialSigned1['hex'], rawTxPartialSigned2['hex']]) | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |