mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 20:12:48 +02:00
test: Implicitly sync after generate*, unless opted out
This commit is contained in:
@@ -141,8 +141,7 @@ class ExampleTest(BitcoinTestFramework):
|
||||
peer_messaging = self.nodes[0].add_p2p_connection(BaseNode())
|
||||
|
||||
# Generating a block on one of the nodes will get us out of IBD
|
||||
blocks = [int(self.generate(self.nodes[0], nblocks=1)[0], 16)]
|
||||
self.sync_all(self.nodes[0:2])
|
||||
blocks = [int(self.generate(self.nodes[0], sync_fun=lambda: self.sync_all(self.nodes[0:2]), nblocks=1)[0], 16)]
|
||||
|
||||
# Notice above how we called an RPC by calling a method with the same
|
||||
# name on the node object. Notice also how we used a keyword argument
|
||||
|
Reference in New Issue
Block a user