Merge #19298: test: Add missing sync_blocks

fa195d4eba test: Add missing sync_blocks (MarcoFalke)

Pull request description:

  Bitcoin Core does not sort block and tx announcements for other peers, so generating 100 blocks and then sending out a transaction might reject it if it arrives too early. (non-final)

  Fix that by syncing the blocks first.

  Fix #19265
  Fix #19311

ACKs for top commit:
  Sjors:
    utACK fa195d4eba: sounds plausible

Tree-SHA512: fdc46aed59595e4189509e71bd4a3607a93893933cc01d806cec2ee7701d54d7422c5f22dd83b81ddb021f9113b3119a688fdd8cf8a6474fc12fea422aedd064
This commit is contained in:
MarcoFalke 2020-06-17 14:45:16 -04:00
commit 35ed88f187
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -93,6 +93,7 @@ class NotificationsTest(BitcoinTestFramework):
self.nodes[0].sethdseed(seed=self.nodes[1].dumpprivkey(keyhash_to_p2pkh(hex_str_to_bytes(self.nodes[1].getwalletinfo()['hdseedid'])[::-1])))
self.nodes[0].rescanblockchain()
self.nodes[0].generatetoaddress(100, ADDRESS_BCRT1_UNSPENDABLE)
self.sync_blocks()
# Generate transaction on node 0, sync mempools, and check for
# notification on node 1.