mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
test: Fix intermittent sync_blocks failures
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test the wallet."""
|
||||
from decimal import Decimal
|
||||
import time
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
@@ -466,12 +465,8 @@ class WalletTest(BitcoinTestFramework):
|
||||
extra_args = ["-walletrejectlongchains", "-limitancestorcount=" + str(2 * chainlimit)]
|
||||
self.start_node(0, extra_args=extra_args)
|
||||
|
||||
# wait for loadmempool
|
||||
timeout = 10
|
||||
while (timeout > 0 and len(self.nodes[0].getrawmempool()) < chainlimit * 2):
|
||||
time.sleep(0.5)
|
||||
timeout -= 0.5
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), chainlimit * 2)
|
||||
# wait until the wallet has submitted all transactions to the mempool
|
||||
wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
|
||||
|
||||
node0_balance = self.nodes[0].getbalance()
|
||||
# With walletrejectlongchains we will not create the tx and store it in our wallet.
|
||||
|
Reference in New Issue
Block a user