mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 15:29:14 +01:00
test: Implicitly sync after generate*, unless opted out
This commit is contained in:
@@ -26,10 +26,8 @@ class GetChainTipsTest (BitcoinTestFramework):
|
||||
|
||||
# Split the network and build two chains of different lengths.
|
||||
self.split_network()
|
||||
self.generatetoaddress(self.nodes[0], 10, self.nodes[0].get_deterministic_priv_key().address)
|
||||
self.generatetoaddress(self.nodes[2], 20, self.nodes[2].get_deterministic_priv_key().address)
|
||||
self.sync_all(self.nodes[:2])
|
||||
self.sync_all(self.nodes[2:])
|
||||
self.generate(self.nodes[0], 10, sync_fun=lambda: self.sync_all(self.nodes[:2]))
|
||||
self.generate(self.nodes[2], 20, sync_fun=lambda: self.sync_all(self.nodes[2:]))
|
||||
|
||||
tips = self.nodes[1].getchaintips ()
|
||||
assert_equal (len (tips), 1)
|
||||
|
||||
Reference in New Issue
Block a user