Skip to content

Commit 6659810

Browse files
committed
test: use named args for sendrawtransaction calls
involving more than one argument.
1 parent 5c1cd78 commit 6659810

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/functional/feature_segwit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def run_test(self):
257257
tx.vin.append(CTxIn(COutPoint(int(txid2, 16), 0), b""))
258258
tx.vout.append(CTxOut(int(49.95 * COIN), CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE]))) # Huge fee
259259
tx.calc_sha256()
260-
txid3 = self.nodes[0].sendrawtransaction(ToHex(tx), 0)
260+
txid3 = self.nodes[0].sendrawtransaction(hexstring=ToHex(tx), maxfeerate=0)
261261
assert tx.wit.is_null()
262262
assert txid3 in self.nodes[0].getrawmempool()
263263

@@ -566,7 +566,7 @@ def mine_and_test_listunspent(self, script_list, ismine):
566566
tx.vout.append(CTxOut(10000000, i))
567567
tx.rehash()
568568
signresults = self.nodes[0].signrawtransactionwithwallet(tx.serialize_without_witness().hex())['hex']
569-
txid = self.nodes[0].sendrawtransaction(signresults, 0)
569+
txid = self.nodes[0].sendrawtransaction(hexstring=signresults, maxfeerate=0)
570570
txs_mined[txid] = self.nodes[0].generate(1)[0]
571571
self.sync_blocks()
572572
watchcount = 0
@@ -618,7 +618,7 @@ def create_and_mine_tx_from_txids(self, txids, success=True):
618618
tx.vout.append(CTxOut(0, CScript()))
619619
tx.rehash()
620620
signresults = self.nodes[0].signrawtransactionwithwallet(tx.serialize_without_witness().hex())['hex']
621-
self.nodes[0].sendrawtransaction(signresults, 0)
621+
self.nodes[0].sendrawtransaction(hexstring=signresults, maxfeerate=0)
622622
self.nodes[0].generate(1)
623623
self.sync_blocks()
624624

test/functional/wallet_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ def run_test(self):
169169
txns_to_send.append(self.nodes[0].signrawtransactionwithwallet(raw_tx))
170170

171171
# Have node 1 (miner) send the transactions
172-
self.nodes[1].sendrawtransaction(txns_to_send[0]["hex"], 0)
173-
self.nodes[1].sendrawtransaction(txns_to_send[1]["hex"], 0)
172+
self.nodes[1].sendrawtransaction(hexstring=txns_to_send[0]["hex"], maxfeerate=0)
173+
self.nodes[1].sendrawtransaction(hexstring=txns_to_send[1]["hex"], maxfeerate=0)
174174

175175
# Have node1 mine a block to confirm transactions:
176176
self.nodes[1].generate(1)
@@ -433,7 +433,7 @@ def run_test(self):
433433
# Split into two chains
434434
rawtx = self.nodes[0].createrawtransaction([{"txid": singletxid, "vout": 0}], {chain_addrs[0]: node0_balance / 2 - Decimal('0.01'), chain_addrs[1]: node0_balance / 2 - Decimal('0.01')})
435435
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx)
436-
singletxid = self.nodes[0].sendrawtransaction(signedtx["hex"], 0)
436+
singletxid = self.nodes[0].sendrawtransaction(hexstring=signedtx["hex"], maxfeerate=0)
437437
self.nodes[0].generate(1)
438438

439439
# Make a long chain of unconfirmed payments without hitting mempool limit

0 commit comments

Comments
 (0)