Skip to content

Commit 8a6082d

Browse files
committed
Test failure of recovery on first node
1 parent 459704b commit 8a6082d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/functional/llmq-signing.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,24 @@ def assert_sigs_nochange(hasrecsigs, isconflicting1, isconflicting2, timeout):
100100
self.mninfo[i].node.quorum("sign", 100, id, msgHash)
101101
wait_for_sigs(True, False, True, 15)
102102

103+
id = "0000000000000000000000000000000000000000000000000000000000000002"
104+
105+
if self.options.spork21:
106+
# Isolate the node that is responsible for the recovery of a signature and assert that recovery fails
107+
q = self.nodes[0].quorum('selectquorum', 100, id)
108+
mn = self.get_mninfo(q['recoveryMembers'][0])
109+
mn.node.setnetworkactive(False)
110+
wait_until(lambda: mn.node.getconnectioncount() == 0)
111+
for i in range(4):
112+
self.mninfo[i].node.quorum("sign", 100, id, msgHash)
113+
assert_sigs_nochange(False, False, False, 3)
114+
# Need to re-connect so that it later gets the recovered sig
115+
mn.node.setnetworkactive(True)
116+
connect_nodes(mn.node, 0)
117+
# Let 1 second pass so that the next node is used for recovery, which should succeed
118+
self.bump_mocktime(1)
119+
set_node_times(self.nodes, self.mocktime)
120+
wait_for_sigs(True, False, True, 5)
121+
103122
if __name__ == '__main__':
104123
LLMQSigningTest().main()

0 commit comments

Comments
 (0)