aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Sanders <[email protected]>2020-07-13 13:43:13 -0400
committerGregory Sanders <[email protected]>2020-07-13 14:18:01 -0400
commit2399a0600ca9c4b676fa2f97520b8ecc44642246 (patch)
treee4f155e628c8acb9981541c3d4c92e869c46120f
parentMake ordering of zmq consumption irrelevant to functional test (diff)
downloaddiscoin-2399a0600ca9c4b676fa2f97520b8ecc44642246.tar.xz
discoin-2399a0600ca9c4b676fa2f97520b8ecc44642246.zip
Add test case for mempool->block zmq notification
-rwxr-xr-xtest/functional/interface_zmq.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py
index 863173b0a..872a1bb71 100755
--- a/test/functional/interface_zmq.py
+++ b/test/functional/interface_zmq.py
@@ -123,6 +123,13 @@ class ZMQTest (BitcoinTestFramework):
hex = rawtx.receive()
assert_equal(payment_txid, hash256_reversed(hex).hex())
+ # Mining the block with this tx should result in second notification
+ # after coinbase tx notification
+ self.nodes[0].generatetoaddress(1, ADDRESS_BCRT1_UNSPENDABLE)
+ hashtx.receive()
+ txid = hashtx.receive()
+ assert_equal(payment_txid, txid.hex())
+
self.log.info("Test the getzmqnotifications RPC")
assert_equal(self.nodes[0].getzmqnotifications(), [