mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-21 09:32:39 +02:00
test: check for zmq block announcements with reorgs
Github-Pull: #26375 Rebased-From: 7b631dc9b1979afc99d9d1a3996492dcb415d3a3
This commit is contained in:
parent
d642ffe2b1
commit
74568a6d89
@ -283,11 +283,17 @@ class ZMQTest (BitcoinTestFramework):
|
||||
assert_equal(hashtx.receive().hex(), self.nodes[1].getblock(connect_blocks[i])["tx"][0])
|
||||
|
||||
# If we do a simple invalidate we announce the disconnected coinbase
|
||||
# and announce the previous fork tip
|
||||
self.nodes[0].invalidateblock(connect_blocks[1])
|
||||
assert_equal(hashblock.receive().hex(), disconnect_block)
|
||||
assert_equal(hashtx.receive().hex(), self.nodes[1].getblock(connect_blocks[1])["tx"][0])
|
||||
# And the current tip
|
||||
assert_equal(hashtx.receive().hex(), self.nodes[1].getblock(connect_blocks[0])["tx"][0])
|
||||
|
||||
# Reconsider block to make sure we receive the block announcements again
|
||||
self.nodes[0].reconsiderblock(connect_blocks[1])
|
||||
assert_equal(hashblock.receive().hex(), connect_blocks[1])
|
||||
|
||||
def test_sequence(self):
|
||||
"""
|
||||
Sequence zmq notifications give every blockhash and txhash in order
|
||||
|
Loading…
Reference in New Issue
Block a user