test: Pass at most one node group to sync_all

This commit is contained in:
MarcoFalke 2019-04-09 11:46:05 -04:00
parent fa4680ed09
commit fafe008cb4
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
5 changed files with 28 additions and 29 deletions
test/functional/test_framework

View file

@ -396,7 +396,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
"""
disconnect_nodes(self.nodes[1], 2)
disconnect_nodes(self.nodes[2], 1)
self.sync_all([self.nodes[:2], self.nodes[2:]])
self.sync_all(self.nodes[:2])
self.sync_all(self.nodes[2:])
def join_network(self):
"""
@ -405,13 +406,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
connect_nodes_bi(self.nodes, 1, 2)
self.sync_all()
def sync_all(self, node_groups=None):
if not node_groups:
node_groups = [self.nodes]
for group in node_groups:
sync_blocks(group)
sync_mempools(group)
def sync_all(self, nodes=None, **kwargs):
sync_blocks(nodes or self.nodes, **kwargs)
sync_mempools(nodes or self.nodes, **kwargs)
# Private helper methods. These should not be accessed by the subclass test scripts.