mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-23 04:16:52 +02:00
Fix race condition in CLTV regtests
On some systems, these tests fail because the default 200 BIP101-version blocks are mined before the test begins, causing them to think BIP65 is already in effect.
This commit is contained in:
@@ -14,6 +14,13 @@ import shutil
|
||||
|
||||
class BIP65Test(BitcoinTestFramework):
|
||||
|
||||
def __init__(self):
|
||||
self.num_nodes = 3
|
||||
|
||||
def setup_chain(self):
|
||||
print "Initializing test directory "+self.options.tmpdir
|
||||
initialize_chain_clean(self.options.tmpdir, self.num_nodes)
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
self.nodes.append(start_node(0, self.options.tmpdir, []))
|
||||
|
||||
@@ -14,6 +14,13 @@ class ForkNotifyTest(BitcoinTestFramework):
|
||||
|
||||
alert_filename = None # Set by setup_network
|
||||
|
||||
def __init__(self):
|
||||
self.num_nodes = 3
|
||||
|
||||
def setup_chain(self):
|
||||
print "Initializing test directory "+self.options.tmpdir
|
||||
initialize_chain_clean(self.options.tmpdir, self.num_nodes)
|
||||
|
||||
def setup_network(self):
|
||||
self.nodes = []
|
||||
self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt")
|
||||
|
||||
Reference in New Issue
Block a user