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:
@@ -16,10 +16,8 @@ import sys
|
||||
import tempfile
|
||||
import urllib
|
||||
|
||||
from test_framework.test_framework import (
|
||||
BitcoinTestFramework,
|
||||
)
|
||||
from test_framework.util import assert_equal, wait_until
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import assert_equal
|
||||
|
||||
|
||||
class LoadblockTest(BitcoinTestFramework):
|
||||
@@ -75,7 +73,7 @@ class LoadblockTest(BitcoinTestFramework):
|
||||
self.log.info("Restart second, unsynced node with bootstrap file")
|
||||
self.stop_node(1)
|
||||
self.start_node(1, ["-loadblock=" + bootstrap_file])
|
||||
wait_until(lambda: self.nodes[1].getblockcount() == 100)
|
||||
assert_equal(self.nodes[1].getblockcount(), 100) # start_node is blocking on all block files being imported
|
||||
|
||||
assert_equal(self.nodes[1].getblockchaininfo()['blocks'], 100)
|
||||
assert_equal(self.nodes[0].getbestblockhash(), self.nodes[1].getbestblockhash())
|
||||
|
Reference in New Issue
Block a user