Skip to content

Commit eefff65

Browse files
committed
scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests
-BEGIN VERIFY SCRIPT- sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/*.py sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/test_framework/*.py -END VERIFY SCRIPT-
1 parent 1e79c05 commit eefff65

25 files changed

+62
-62
lines changed

test/functional/feature_bip68_sequence.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_disable_flag(self):
7070
tx1.vin = [CTxIn(COutPoint(int(utxo["txid"], 16), utxo["vout"]), nSequence=sequence_value)]
7171
tx1.vout = [CTxOut(value, CScript([b'a']))]
7272

73-
tx1_signed = self.nodes[0].signrawtransaction(ToHex(tx1))["hex"]
73+
tx1_signed = self.nodes[0].signrawtransactionwithwallet(ToHex(tx1))["hex"]
7474
tx1_id = self.nodes[0].sendrawtransaction(tx1_signed)
7575
tx1_id = int(tx1_id, 16)
7676

@@ -176,7 +176,7 @@ def test_sequence_lock_confirmed_inputs(self):
176176
# Overestimate the size of the tx - signatures should be less than 120 bytes, and leave 50 for the output
177177
tx_size = len(ToHex(tx))//2 + 120*num_inputs + 50
178178
tx.vout.append(CTxOut(int(value-self.relayfee*tx_size*COIN/1000), CScript([b'a'])))
179-
rawtx = self.nodes[0].signrawtransaction(ToHex(tx))["hex"]
179+
rawtx = self.nodes[0].signrawtransactionwithwallet(ToHex(tx))["hex"]
180180

181181
if (using_sequence_locks and not should_pass):
182182
# This transaction should be rejected
@@ -205,7 +205,7 @@ def test_sequence_lock_unconfirmed_inputs(self):
205205
tx2.nVersion = 2
206206
tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)]
207207
tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))]
208-
tx2_raw = self.nodes[0].signrawtransaction(ToHex(tx2))["hex"]
208+
tx2_raw = self.nodes[0].signrawtransactionwithwallet(ToHex(tx2))["hex"]
209209
tx2 = FromHex(tx2, tx2_raw)
210210
tx2.rehash()
211211

@@ -278,7 +278,7 @@ def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock):
278278
utxos = self.nodes[0].listunspent()
279279
tx5.vin.append(CTxIn(COutPoint(int(utxos[0]["txid"], 16), utxos[0]["vout"]), nSequence=1))
280280
tx5.vout[0].nValue += int(utxos[0]["amount"]*COIN)
281-
raw_tx5 = self.nodes[0].signrawtransaction(ToHex(tx5))["hex"]
281+
raw_tx5 = self.nodes[0].signrawtransactionwithwallet(ToHex(tx5))["hex"]
282282

283283
assert_raises_rpc_error(-26, NOT_FINAL_ERROR, self.nodes[0].sendrawtransaction, raw_tx5)
284284

@@ -338,7 +338,7 @@ def test_bip68_not_consensus(self):
338338
tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))]
339339

340340
# sign tx2
341-
tx2_raw = self.nodes[0].signrawtransaction(ToHex(tx2))["hex"]
341+
tx2_raw = self.nodes[0].signrawtransactionwithwallet(ToHex(tx2))["hex"]
342342
tx2 = FromHex(tx2, tx2_raw)
343343
tx2.rehash()
344344

@@ -388,7 +388,7 @@ def test_version2_relay(self):
388388
rawtxfund = self.nodes[1].fundrawtransaction(rawtx)['hex']
389389
tx = FromHex(CTransaction(), rawtxfund)
390390
tx.nVersion = 2
391-
tx_signed = self.nodes[1].signrawtransaction(ToHex(tx))["hex"]
391+
tx_signed = self.nodes[1].signrawtransactionwithwallet(ToHex(tx))["hex"]
392392
self.nodes[1].sendrawtransaction(tx_signed)
393393

394394
if __name__ == '__main__':

test/functional/feature_bip9_softforks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def create_transaction(self, node, coinbase, to_address, amount):
5151
return tx
5252

5353
def sign_transaction(self, node, tx):
54-
signresult = node.signrawtransaction(bytes_to_hex_str(tx.serialize()))
54+
signresult = node.signrawtransactionwithwallet(bytes_to_hex_str(tx.serialize()))
5555
tx = CTransaction()
5656
f = BytesIO(hex_str_to_bytes(signresult['hex']))
5757
tx.deserialize(f)

test/functional/feature_cltv.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def cltv_validate(node, tx, height):
4141
tx.nLockTime = height
4242

4343
# Need to re-sign, since nSequence and nLockTime changed
44-
signed_result = node.signrawtransaction(ToHex(tx))
44+
signed_result = node.signrawtransactionwithwallet(ToHex(tx))
4545
new_tx = CTransaction()
4646
new_tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex'])))
4747

@@ -54,7 +54,7 @@ def create_transaction(node, coinbase, to_address, amount):
5454
inputs = [{ "txid" : from_txid, "vout" : 0}]
5555
outputs = { to_address : amount }
5656
rawtx = node.createrawtransaction(inputs, outputs)
57-
signresult = node.signrawtransaction(rawtx)
57+
signresult = node.signrawtransactionwithwallet(rawtx)
5858
tx = CTransaction()
5959
tx.deserialize(BytesIO(hex_str_to_bytes(signresult['hex'])))
6060
return tx

test/functional/feature_csv_activation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def create_transaction(self, node, txid, to_address, amount):
118118

119119
def sign_transaction(self, node, unsignedtx):
120120
rawtx = ToHex(unsignedtx)
121-
signresult = node.signrawtransaction(rawtx)
121+
signresult = node.signrawtransactionwithwallet(rawtx)
122122
tx = CTransaction()
123123
f = BytesIO(hex_str_to_bytes(signresult['hex']))
124124
tx.deserialize(f)

test/functional/feature_dbcrash.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def generate_small_transactions(self, node, count, utxo_list):
206206
tx.vout.append(CTxOut(output_amount, hex_str_to_bytes(utxo['scriptPubKey'])))
207207

208208
# Sign and send the transaction to get into the mempool
209-
tx_signed_hex = node.signrawtransaction(ToHex(tx))['hex']
209+
tx_signed_hex = node.signrawtransactionwithwallet(ToHex(tx))['hex']
210210
node.sendrawtransaction(tx_signed_hex)
211211
num_transactions += 1
212212

test/functional/feature_dersig.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def create_transaction(node, coinbase, to_address, amount):
4242
inputs = [{ "txid" : from_txid, "vout" : 0}]
4343
outputs = { to_address : amount }
4444
rawtx = node.createrawtransaction(inputs, outputs)
45-
signresult = node.signrawtransaction(rawtx)
45+
signresult = node.signrawtransactionwithwallet(rawtx)
4646
tx = CTransaction()
4747
tx.deserialize(BytesIO(hex_str_to_bytes(signresult['hex'])))
4848
return tx

test/functional/feature_fee_estimation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def split_inputs(from_node, txins, txouts, initial_split=False):
9191
# If this is the initial split we actually need to sign the transaction
9292
# Otherwise we just need to insert the proper ScriptSig
9393
if (initial_split):
94-
completetx = from_node.signrawtransaction(ToHex(tx))["hex"]
94+
completetx = from_node.signrawtransactionwithwallet(ToHex(tx))["hex"]
9595
else:
9696
tx.vin[0].scriptSig = SCRIPT_SIG[prevtxout["vout"]]
9797
completetx = ToHex(tx)

test/functional/feature_nulldummy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def create_transaction(self, node, txid, to_address, amount):
102102
inputs = [{ "txid" : txid, "vout" : 0}]
103103
outputs = { to_address : amount }
104104
rawtx = node.createrawtransaction(inputs, outputs)
105-
signresult = node.signrawtransaction(rawtx)
105+
signresult = node.signrawtransactionwithwallet(rawtx)
106106
tx = CTransaction()
107107
f = BytesIO(hex_str_to_bytes(signresult['hex']))
108108
tx.deserialize(f)

test/functional/feature_rbf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def make_utxo(node, amount, confirmed=True, scriptPubKey=CScript([1])):
4242
tx2.vout = [CTxOut(amount, scriptPubKey)]
4343
tx2.rehash()
4444

45-
signed_tx = node.signrawtransaction(txToHex(tx2))
45+
signed_tx = node.signrawtransactionwithwallet(txToHex(tx2))
4646

4747
txid = node.sendrawtransaction(signed_tx['hex'], True)
4848

test/functional/feature_segwit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def run_test(self):
221221
tx = CTransaction()
222222
tx.vin.append(CTxIn(COutPoint(int(txid1, 16), 0), b''))
223223
tx.vout.append(CTxOut(int(49.99*COIN), CScript([OP_TRUE])))
224-
tx2_hex = self.nodes[0].signrawtransaction(ToHex(tx))['hex']
224+
tx2_hex = self.nodes[0].signrawtransactionwithwallet(ToHex(tx))['hex']
225225
txid2 = self.nodes[0].sendrawtransaction(tx2_hex)
226226
tx = FromHex(CTransaction(), tx2_hex)
227227
assert(not tx.wit.is_null())
@@ -559,7 +559,7 @@ def run_test(self):
559559

560560
self.nodes[1].importaddress(scriptPubKey, "", False)
561561
rawtxfund = self.nodes[1].fundrawtransaction(transaction)['hex']
562-
rawtxfund = self.nodes[1].signrawtransaction(rawtxfund)["hex"]
562+
rawtxfund = self.nodes[1].signrawtransactionwithwallet(rawtxfund)["hex"]
563563
txid = self.nodes[1].sendrawtransaction(rawtxfund)
564564

565565
assert_equal(self.nodes[1].gettransaction(txid, True)["txid"], txid)
@@ -578,7 +578,7 @@ def mine_and_test_listunspent(self, script_list, ismine):
578578
for i in script_list:
579579
tx.vout.append(CTxOut(10000000, i))
580580
tx.rehash()
581-
signresults = self.nodes[0].signrawtransaction(bytes_to_hex_str(tx.serialize_without_witness()))['hex']
581+
signresults = self.nodes[0].signrawtransactionwithwallet(bytes_to_hex_str(tx.serialize_without_witness()))['hex']
582582
txid = self.nodes[0].sendrawtransaction(signresults, True)
583583
self.nodes[0].generate(1)
584584
sync_blocks(self.nodes)
@@ -630,7 +630,7 @@ def create_and_mine_tx_from_txids(self, txids, success = True):
630630
tx.vin.append(CTxIn(COutPoint(int('0x'+i,0), j)))
631631
tx.vout.append(CTxOut(0, CScript()))
632632
tx.rehash()
633-
signresults = self.nodes[0].signrawtransaction(bytes_to_hex_str(tx.serialize_without_witness()))['hex']
633+
signresults = self.nodes[0].signrawtransactionwithwallet(bytes_to_hex_str(tx.serialize_without_witness()))['hex']
634634
self.nodes[0].sendrawtransaction(signresults, True)
635635
self.nodes[0].generate(1)
636636
sync_blocks(self.nodes)

test/functional/mempool_limit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def run_test(self):
3232
self.nodes[0].settxfee(relayfee) # specifically fund this tx with low fee
3333
txF = self.nodes[0].fundrawtransaction(tx)
3434
self.nodes[0].settxfee(0) # return to automatic fee selection
35-
txFS = self.nodes[0].signrawtransaction(txF['hex'])
35+
txFS = self.nodes[0].signrawtransactionwithwallet(txF['hex'])
3636
txid = self.nodes[0].sendrawtransaction(txFS['hex'])
3737

3838
relayfee = self.nodes[0].getnetworkinfo()['relayfee']
@@ -57,7 +57,7 @@ def run_test(self):
5757
tx = self.nodes[0].createrawtransaction(inputs, outputs)
5858
# specifically fund this tx with a fee < mempoolminfee, >= than minrelaytxfee
5959
txF = self.nodes[0].fundrawtransaction(tx, {'feeRate': relayfee})
60-
txFS = self.nodes[0].signrawtransaction(txF['hex'])
60+
txFS = self.nodes[0].signrawtransactionwithwallet(txF['hex'])
6161
assert_raises_rpc_error(-26, "mempool min fee not met, 166 < 411 (code 66)", self.nodes[0].sendrawtransaction, txFS['hex'])
6262

6363
if __name__ == '__main__':

test/functional/mempool_packages.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def chain_transaction(self, node, parent_txid, vout, value, fee, num_outputs):
2525
for i in range(num_outputs):
2626
outputs[node.getnewaddress()] = send_value
2727
rawtx = node.createrawtransaction(inputs, outputs)
28-
signedtx = node.signrawtransaction(rawtx)
28+
signedtx = node.signrawtransactionwithwallet(rawtx)
2929
txid = node.sendrawtransaction(signedtx['hex'])
3030
fulltx = node.getrawtransaction(txid, 1)
3131
assert(len(fulltx['vout']) == num_outputs) # make sure we didn't generate a change output
@@ -205,7 +205,7 @@ def run_test(self):
205205
for i in range(2):
206206
outputs[self.nodes[0].getnewaddress()] = send_value
207207
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
208-
signedtx = self.nodes[0].signrawtransaction(rawtx)
208+
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx)
209209
txid = self.nodes[0].sendrawtransaction(signedtx['hex'])
210210
tx0_id = txid
211211
value = send_value
@@ -229,7 +229,7 @@ def run_test(self):
229229
inputs = [ {'txid' : tx1_id, 'vout': 0}, {'txid' : txid, 'vout': 0} ]
230230
outputs = { self.nodes[0].getnewaddress() : send_value + value - 4*fee }
231231
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
232-
signedtx = self.nodes[0].signrawtransaction(rawtx)
232+
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx)
233233
txid = self.nodes[0].sendrawtransaction(signedtx['hex'])
234234
sync_mempools(self.nodes)
235235

test/functional/mempool_reorg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def run_test(self):
4848
# Set the time lock
4949
timelock_tx = timelock_tx.replace("ffffffff", "11111191", 1)
5050
timelock_tx = timelock_tx[:-8] + hex(self.nodes[0].getblockcount() + 2)[2:] + "000000"
51-
timelock_tx = self.nodes[0].signrawtransaction(timelock_tx)["hex"]
51+
timelock_tx = self.nodes[0].signrawtransactionwithwallet(timelock_tx)["hex"]
5252
# This will raise an exception because the timelock transaction is too immature to spend
5353
assert_raises_rpc_error(-26, "non-final", self.nodes[0].sendrawtransaction, timelock_tx)
5454

test/functional/mining_prioritisetransaction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def run_test(self):
116116
inputs.append({"txid" : utxo["txid"], "vout" : utxo["vout"]})
117117
outputs[self.nodes[0].getnewaddress()] = utxo["amount"]
118118
raw_tx = self.nodes[0].createrawtransaction(inputs, outputs)
119-
tx_hex = self.nodes[0].signrawtransaction(raw_tx)["hex"]
119+
tx_hex = self.nodes[0].signrawtransactionwithwallet(raw_tx)["hex"]
120120
tx_id = self.nodes[0].decoderawtransaction(tx_hex)["txid"]
121121

122122
# This will raise an exception due to min relay fee not being met

test/functional/rpc_fundrawtransaction.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def run_test(self):
449449
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
450450
fundedTx = self.nodes[2].fundrawtransaction(rawtx)
451451

452-
signedTx = self.nodes[2].signrawtransaction(fundedTx['hex'])
452+
signedTx = self.nodes[2].signrawtransactionwithwallet(fundedTx['hex'])
453453
txId = self.nodes[2].sendrawtransaction(signedTx['hex'])
454454
self.sync_all()
455455
self.nodes[1].generate(1)
@@ -503,7 +503,7 @@ def run_test(self):
503503

504504
#now we need to unlock
505505
self.nodes[1].walletpassphrase("test", 600)
506-
signedTx = self.nodes[1].signrawtransaction(fundedTx['hex'])
506+
signedTx = self.nodes[1].signrawtransactionwithwallet(fundedTx['hex'])
507507
txId = self.nodes[1].sendrawtransaction(signedTx['hex'])
508508
self.nodes[1].generate(1)
509509
self.sync_all()
@@ -564,7 +564,7 @@ def run_test(self):
564564
outputs = {self.nodes[0].getnewaddress():0.15,self.nodes[0].getnewaddress():0.04}
565565
rawtx = self.nodes[1].createrawtransaction(inputs, outputs)
566566
fundedTx = self.nodes[1].fundrawtransaction(rawtx)
567-
fundedAndSignedTx = self.nodes[1].signrawtransaction(fundedTx['hex'])
567+
fundedAndSignedTx = self.nodes[1].signrawtransactionwithwallet(fundedTx['hex'])
568568
txId = self.nodes[1].sendrawtransaction(fundedAndSignedTx['hex'])
569569
self.sync_all()
570570
self.nodes[0].generate(1)
@@ -622,9 +622,9 @@ def run_test(self):
622622
assert_greater_than(result["changepos"], -1)
623623
assert_equal(result["fee"] + res_dec["vout"][result["changepos"]]["value"], watchonly_amount / 10)
624624

625-
signedtx = self.nodes[3].signrawtransaction(result["hex"])
625+
signedtx = self.nodes[3].signrawtransactionwithwallet(result["hex"])
626626
assert(not signedtx["complete"])
627-
signedtx = self.nodes[0].signrawtransaction(signedtx["hex"])
627+
signedtx = self.nodes[0].signrawtransactionwithwallet(signedtx["hex"])
628628
assert(signedtx["complete"])
629629
self.nodes[0].sendrawtransaction(signedtx["hex"])
630630
self.nodes[0].generate(1)

test/functional/rpc_listtransactions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def get_unconfirmed_utxo_entry(node, txid_to_match):
131131
inputs = [{"txid":utxo_to_use["txid"], "vout":utxo_to_use["vout"]}]
132132
outputs = {self.nodes[0].getnewaddress(): 0.999}
133133
tx2 = self.nodes[1].createrawtransaction(inputs, outputs)
134-
tx2_signed = self.nodes[1].signrawtransaction(tx2)["hex"]
134+
tx2_signed = self.nodes[1].signrawtransactionwithwallet(tx2)["hex"]
135135
txid_2 = self.nodes[1].sendrawtransaction(tx2_signed)
136136

137137
# ...and check the result
@@ -148,7 +148,7 @@ def get_unconfirmed_utxo_entry(node, txid_to_match):
148148
tx3_modified = txFromHex(tx3)
149149
tx3_modified.vin[0].nSequence = 0
150150
tx3 = bytes_to_hex_str(tx3_modified.serialize())
151-
tx3_signed = self.nodes[0].signrawtransaction(tx3)['hex']
151+
tx3_signed = self.nodes[0].signrawtransactionwithwallet(tx3)['hex']
152152
txid_3 = self.nodes[0].sendrawtransaction(tx3_signed)
153153

154154
assert(is_opt_in(self.nodes[0], txid_3))
@@ -162,7 +162,7 @@ def get_unconfirmed_utxo_entry(node, txid_to_match):
162162
inputs = [{"txid": txid_3, "vout":utxo_to_use["vout"]}]
163163
outputs = {self.nodes[0].getnewaddress(): 0.997}
164164
tx4 = self.nodes[1].createrawtransaction(inputs, outputs)
165-
tx4_signed = self.nodes[1].signrawtransaction(tx4)["hex"]
165+
tx4_signed = self.nodes[1].signrawtransactionwithwallet(tx4)["hex"]
166166
txid_4 = self.nodes[1].sendrawtransaction(tx4_signed)
167167

168168
assert(not is_opt_in(self.nodes[1], txid_4))
@@ -174,7 +174,7 @@ def get_unconfirmed_utxo_entry(node, txid_to_match):
174174
tx3_b = tx3_modified
175175
tx3_b.vout[0].nValue -= int(Decimal("0.004") * COIN) # bump the fee
176176
tx3_b = bytes_to_hex_str(tx3_b.serialize())
177-
tx3_b_signed = self.nodes[0].signrawtransaction(tx3_b)['hex']
177+
tx3_b_signed = self.nodes[0].signrawtransactionwithwallet(tx3_b)['hex']
178178
txid_3b = self.nodes[0].sendrawtransaction(tx3_b_signed, True)
179179
assert(is_opt_in(self.nodes[0], txid_3b))
180180

test/functional/rpc_rawtransaction.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
Test the following RPCs:
88
- createrawtransaction
9-
- signrawtransaction
9+
- signrawtransactionwithwallet
1010
- sendrawtransaction
1111
- decoderawtransaction
1212
- getrawtransaction
@@ -104,7 +104,7 @@ def run_test(self):
104104
inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000", 'vout' : 1}] #won't exists
105105
outputs = { self.nodes[0].getnewaddress() : 4.998 }
106106
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
107-
rawtx = self.nodes[2].signrawtransaction(rawtx)
107+
rawtx = self.nodes[2].signrawtransactionwithwallet(rawtx)
108108

109109
# This will raise an exception since there are missing inputs
110110
assert_raises_rpc_error(-25, "Missing inputs", self.nodes[2].sendrawtransaction, rawtx['hex'])
@@ -202,10 +202,10 @@ def run_test(self):
202202
inputs = [{ "txid" : txId, "vout" : vout['n'], "scriptPubKey" : vout['scriptPubKey']['hex'], "amount" : vout['value']}]
203203
outputs = { self.nodes[0].getnewaddress() : 2.19 }
204204
rawTx = self.nodes[2].createrawtransaction(inputs, outputs)
205-
rawTxPartialSigned = self.nodes[1].signrawtransaction(rawTx, inputs)
205+
rawTxPartialSigned = self.nodes[1].signrawtransactionwithwallet(rawTx, inputs)
206206
assert_equal(rawTxPartialSigned['complete'], False) #node1 only has one key, can't comp. sign the tx
207207

208-
rawTxSigned = self.nodes[2].signrawtransaction(rawTx, inputs)
208+
rawTxSigned = self.nodes[2].signrawtransactionwithwallet(rawTx, inputs)
209209
assert_equal(rawTxSigned['complete'], True) #node2 can sign the tx compl., own two of three keys
210210
self.nodes[2].sendrawtransaction(rawTxSigned['hex'])
211211
rawTx = self.nodes[0].decoderawtransaction(rawTxSigned['hex'])
@@ -247,11 +247,11 @@ def run_test(self):
247247
inputs = [{ "txid" : txId, "vout" : vout['n'], "scriptPubKey" : vout['scriptPubKey']['hex'], "redeemScript" : mSigObjValid['hex'], "amount" : vout['value']}]
248248
outputs = { self.nodes[0].getnewaddress() : 2.19 }
249249
rawTx2 = self.nodes[2].createrawtransaction(inputs, outputs)
250-
rawTxPartialSigned1 = self.nodes[1].signrawtransaction(rawTx2, inputs)
250+
rawTxPartialSigned1 = self.nodes[1].signrawtransactionwithwallet(rawTx2, inputs)
251251
self.log.info(rawTxPartialSigned1)
252252
assert_equal(rawTxPartialSigned['complete'], False) #node1 only has one key, can't comp. sign the tx
253253

254-
rawTxPartialSigned2 = self.nodes[2].signrawtransaction(rawTx2, inputs)
254+
rawTxPartialSigned2 = self.nodes[2].signrawtransactionwithwallet(rawTx2, inputs)
255255
self.log.info(rawTxPartialSigned2)
256256
assert_equal(rawTxPartialSigned2['complete'], False) #node2 only has one key, can't comp. sign the tx
257257
rawTxComb = self.nodes[2].combinerawtransaction([rawTxPartialSigned1['hex'], rawTxPartialSigned2['hex']])

0 commit comments

Comments
 (0)