Skip to content

Commit 28ea4c7

Browse files
committed
test: simplify splitment with sendall in wallet_basic
recipients receive equal share of the unspecified amount
1 parent 923d245 commit 28ea4c7

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/functional/wallet_basic.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -585,15 +585,9 @@ def run_test(self):
585585

586586
# ==Check that wallet prefers to use coins that don't exceed mempool limits =====
587587

588-
# Get all non-zero utxos together
588+
# Get all non-zero utxos together and split into two chains
589589
chain_addrs = [self.nodes[0].getnewaddress(), self.nodes[0].getnewaddress()]
590-
singletxid = self.nodes[0].sendall(recipients=[chain_addrs[0]])['txid']
591-
self.generate(self.nodes[0], 1, sync_fun=self.no_op)
592-
node0_balance = self.nodes[0].getbalance()
593-
# Split into two chains
594-
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')})
595-
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx)
596-
singletxid = self.nodes[0].sendrawtransaction(hexstring=signedtx["hex"], maxfeerate=0)
590+
self.nodes[0].sendall(recipients=chain_addrs)
597591
self.generate(self.nodes[0], 1, sync_fun=self.no_op)
598592

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

0 commit comments

Comments
 (0)