Skip to content

Commit fa6dc7c

Browse files
author
MarcoFalke
committed
test: Add BitcoinTestFramework::sync_* methods
1 parent fafe008 commit fa6dc7c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,15 @@ def join_network(self):
406406
connect_nodes_bi(self.nodes, 1, 2)
407407
self.sync_all()
408408

409+
def sync_blocks(self, nodes=None, **kwargs):
410+
sync_blocks(nodes or self.nodes, **kwargs)
411+
412+
def sync_mempools(self, nodes=None, **kwargs):
413+
sync_mempools(nodes or self.nodes, **kwargs)
414+
409415
def sync_all(self, nodes=None, **kwargs):
410-
sync_blocks(nodes or self.nodes, **kwargs)
411-
sync_mempools(nodes or self.nodes, **kwargs)
416+
self.sync_blocks(nodes, **kwargs)
417+
self.sync_mempools(nodes, **kwargs)
412418

413419
# Private helper methods. These should not be accessed by the subclass test scripts.
414420

@@ -494,7 +500,7 @@ def _initialize_chain(self):
494500
# see the tip age check in IsInitialBlockDownload().
495501
for i in range(8):
496502
self.nodes[0].generatetoaddress(25 if i != 7 else 24, self.nodes[i % 4].get_deterministic_priv_key().address)
497-
sync_blocks(self.nodes)
503+
self.sync_blocks()
498504

499505
for n in self.nodes:
500506
assert_equal(n.getblockchaininfo()["blocks"], 199)

0 commit comments

Comments
 (0)