aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-09 11:57:10 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-09 12:08:27 -0400
commitfa6dc7c5c3477bda04481f080d430f63539974e2 (patch)
tree20e373b0fea6732230bff686790d70759360a2d8
parentfafe008cb407cd3830b0ae25a4e9f4400ff66b6e (diff)
test: Add BitcoinTestFramework::sync_* methods
-rwxr-xr-xtest/functional/test_framework/test_framework.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 81ab571a40..4aeff24d12 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -406,9 +406,15 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
connect_nodes_bi(self.nodes, 1, 2)
self.sync_all()
+ def sync_blocks(self, nodes=None, **kwargs):
+ sync_blocks(nodes or self.nodes, **kwargs)
+
+ def sync_mempools(self, nodes=None, **kwargs):
+ sync_mempools(nodes or self.nodes, **kwargs)
+
def sync_all(self, nodes=None, **kwargs):
- sync_blocks(nodes or self.nodes, **kwargs)
- sync_mempools(nodes or self.nodes, **kwargs)
+ self.sync_blocks(nodes, **kwargs)
+ self.sync_mempools(nodes, **kwargs)
# Private helper methods. These should not be accessed by the subclass test scripts.
@@ -494,7 +500,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
# see the tip age check in IsInitialBlockDownload().
for i in range(8):
self.nodes[0].generatetoaddress(25 if i != 7 else 24, self.nodes[i % 4].get_deterministic_priv_key().address)
- sync_blocks(self.nodes)
+ self.sync_blocks()
for n in self.nodes:
assert_equal(n.getblockchaininfo()["blocks"], 199)