mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-26 22:08:58 +01:00
test: Remove confusing and broken use of wait_until global
This commit is contained in:
@@ -12,7 +12,6 @@ from test_framework.util import (
|
|||||||
assert_fee_amount,
|
assert_fee_amount,
|
||||||
assert_raises_rpc_error,
|
assert_raises_rpc_error,
|
||||||
connect_nodes,
|
connect_nodes,
|
||||||
wait_until,
|
|
||||||
)
|
)
|
||||||
from test_framework.wallet_util import test_address
|
from test_framework.wallet_util import test_address
|
||||||
|
|
||||||
@@ -540,7 +539,7 @@ class WalletTest(BitcoinTestFramework):
|
|||||||
self.start_node(2, [m, "-limitancestorcount=" + str(chainlimit)])
|
self.start_node(2, [m, "-limitancestorcount=" + str(chainlimit)])
|
||||||
if m == '-reindex':
|
if m == '-reindex':
|
||||||
# reindex will leave rpc warm up "early"; Wait for it to finish
|
# reindex will leave rpc warm up "early"; Wait for it to finish
|
||||||
wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
|
self.wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
|
||||||
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
|
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
|
||||||
|
|
||||||
# Exercise listsinceblock with the last two blocks
|
# Exercise listsinceblock with the last two blocks
|
||||||
@@ -589,7 +588,7 @@ class WalletTest(BitcoinTestFramework):
|
|||||||
self.start_node(0, extra_args=extra_args)
|
self.start_node(0, extra_args=extra_args)
|
||||||
|
|
||||||
# wait until the wallet has submitted all transactions to the mempool
|
# wait until the wallet has submitted all transactions to the mempool
|
||||||
wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
|
self.wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
|
||||||
|
|
||||||
node0_balance = self.nodes[0].getbalance()
|
node0_balance = self.nodes[0].getbalance()
|
||||||
# With walletrejectlongchains we will not create the tx and store it in our wallet.
|
# With walletrejectlongchains we will not create the tx and store it in our wallet.
|
||||||
|
|||||||
Reference in New Issue
Block a user