Changeset View
Changeset View
Standalone View
Standalone View
test/functional/interface_zmq.py
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | def _zmq_test(self): | ||||
assert_equal(payment_txid, txid.hex()) | assert_equal(payment_txid, txid.hex()) | ||||
# Should receive the broadcasted raw transaction. | # Should receive the broadcasted raw transaction. | ||||
hex = self.rawtx.receive() | hex = self.rawtx.receive() | ||||
assert_equal(payment_txid, hash256(hex).hex()) | assert_equal(payment_txid, hash256(hex).hex()) | ||||
self.log.info("Test the getzmqnotifications RPC") | self.log.info("Test the getzmqnotifications RPC") | ||||
assert_equal(self.nodes[0].getzmqnotifications(), [ | assert_equal(self.nodes[0].getzmqnotifications(), [ | ||||
{"type": "pubhashblock", "address": ADDRESS}, | {"type": "pubhashblock", "address": ADDRESS, "hwm": 1000}, | ||||
{"type": "pubhashtx", "address": ADDRESS}, | {"type": "pubhashtx", "address": ADDRESS, "hwm": 1000}, | ||||
{"type": "pubrawblock", "address": ADDRESS}, | {"type": "pubrawblock", "address": ADDRESS, "hwm": 1000}, | ||||
{"type": "pubrawtx", "address": ADDRESS}, | {"type": "pubrawtx", "address": ADDRESS, "hwm": 1000}, | ||||
]) | ]) | ||||
assert_equal(self.nodes[1].getzmqnotifications(), []) | assert_equal(self.nodes[1].getzmqnotifications(), []) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
ZMQTest().main() | ZMQTest().main() |