aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2022-08-30 15:55:33 -0300
committerbrunoerg <brunoely.gc@gmail.com>2022-08-30 16:28:40 -0300
commit28ea4c7039710541e70ec01abefc3eb8268e06f5 (patch)
treec77fd04a08bc601f1dbbe46dac37c200a486ac4a /test
parent923d24583d826f4c6ecad30b185e0e043ea11dfc (diff)
test: simplify splitment with `sendall` in wallet_basic
recipients receive equal share of the unspecified amount
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_basic.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py
index 55c2a37fa7..5d3d78c2dc 100755
--- a/test/functional/wallet_basic.py
+++ b/test/functional/wallet_basic.py
@@ -585,15 +585,9 @@ class WalletTest(BitcoinTestFramework):
# ==Check that wallet prefers to use coins that don't exceed mempool limits =====
- # Get all non-zero utxos together
+ # Get all non-zero utxos together and split into two chains
chain_addrs = [self.nodes[0].getnewaddress(), self.nodes[0].getnewaddress()]
- singletxid = self.nodes[0].sendall(recipients=[chain_addrs[0]])['txid']
- self.generate(self.nodes[0], 1, sync_fun=self.no_op)
- node0_balance = self.nodes[0].getbalance()
- # Split into two chains
- 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')})
- signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx)
- singletxid = self.nodes[0].sendrawtransaction(hexstring=signedtx["hex"], maxfeerate=0)
+ self.nodes[0].sendall(recipients=chain_addrs)
self.generate(self.nodes[0], 1, sync_fun=self.no_op)
# Make a long chain of unconfirmed payments without hitting mempool limit