test: Implicitly sync after generate*, unless opted out

This commit is contained in:
MarcoFalke
2020-11-10 18:02:31 +01:00
parent 5574881ce3
commit facc352648
46 changed files with 144 additions and 175 deletions

View File

@@ -26,7 +26,7 @@ class AbortNodeTest(BitcoinTestFramework):
# We'll connect the nodes later
def run_test(self):
self.generate(self.nodes[0], 3)
self.generate(self.nodes[0], 3, sync_fun=self.no_op)
datadir = get_datadir_path(self.options.tmpdir, 0)
# Deleting the undo file will result in reorg failure
@@ -34,10 +34,10 @@ class AbortNodeTest(BitcoinTestFramework):
# Connecting to a node with a more work chain will trigger a reorg
# attempt.
self.generate(self.nodes[1], 3)
self.generate(self.nodes[1], 3, sync_fun=self.no_op)
with self.nodes[0].assert_debug_log(["Failed to disconnect block"]):
self.connect_nodes(0, 1)
self.generate(self.nodes[1], 1)
self.generate(self.nodes[1], 1, sync_fun=self.no_op)
# Check that node0 aborted
self.log.info("Waiting for crash")