Skip to content

Commit ce682f2

Browse files
Merge dashpay#6721: test: fix and re-enable (hash/raw)recoveredsig zmq test
492d678 test: fix and re-enable (hash/raw)recoveredsig zmq test (UdjinM6) Pull request description: ## Issue being fixed or feature implemented The issue with zmq test was discovered by @coderabbitai while reviewing dashpay#6718, see dashpay#6718 (comment) ## What was done? Use correct quorum type and hash, re-enable `test_recovered_signature_publishers()` ## How Has This Been Tested? Run `interface_zmq_dash.py` ## Breaking Changes n/a ## Checklist: - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 492d678 Tree-SHA512: 2ff45dadada5dcc3f7e4404f3223ee598a7676fb272d29072a1865b468ca71c13ab20b25da549f3b36e15fba22c31b908cf65451c5d925d884397fe7a2ff77fd
2 parents ea5c416 + 492d678 commit ce682f2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/functional/interface_zmq_dash.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def run_test(self):
151151
# has been sent which leads to test failure.
152152
time.sleep(1)
153153
# Test all dash related ZMQ publisher
154-
#self.test_recovered_signature_publishers()
154+
self.test_recovered_signature_publishers()
155155
self.test_chainlock_publishers()
156156
self.test_governance_publishers()
157157
self.test_getzmqnotifications()
@@ -192,7 +192,7 @@ def test_recovered_signature_publishers(self):
192192
def validate_recovered_sig(request_id, msg_hash):
193193
# Make sure the recovered sig exists by RPC
194194
self.wait_for_recovered_sig(request_id, msg_hash)
195-
rpc_recovered_sig = self.mninfo[0].get_node(self).quorum('getrecsig', 103, request_id, msg_hash)
195+
rpc_recovered_sig = self.mninfo[0].get_node(self).quorum('getrecsig', 100, request_id, msg_hash)
196196
# Validate hashrecoveredsig
197197
zmq_recovered_sig_hash = self.subscribers[ZMQPublisher.hash_recovered_sig].receive().read(32).hex()
198198
assert_equal(zmq_recovered_sig_hash, msg_hash)
@@ -221,8 +221,9 @@ def validate_recovered_sig(request_id, msg_hash):
221221
# Sign an arbitrary and make sure this leads to valid recovered sig ZMQ messages
222222
sign_id = uint256_to_string(random.getrandbits(256))
223223
sign_msg_hash = uint256_to_string(random.getrandbits(256))
224-
for mn in self.get_quorum_masternodes(self.quorum_hash): # type: MasternodeInfo
225-
mn.get_node(self).quorum("sign", self.quorum_type, sign_id, sign_msg_hash)
224+
quorumHash = self.nodes[0].quorum("selectquorum", 100, sign_id)["quorumHash"]
225+
for mn in self.get_quorum_masternodes(quorumHash): # type: MasternodeInfo
226+
mn.get_node(self).quorum("sign", 100, sign_id, sign_msg_hash)
226227
validate_recovered_sig(sign_id, sign_msg_hash)
227228
# Unsubscribe from recovered signature messages
228229
self.unsubscribe(recovered_sig_publishers)

0 commit comments

Comments
 (0)