16
16
import time
17
17
18
18
from test_framework .test_framework import DashTestFramework
19
- from test_framework .util import set_node_times , isolate_node , reconnect_isolated_node
19
+ from test_framework .util import set_node_times
20
20
21
21
22
22
class LLMQ_IS_RetroactiveSigning (DashTestFramework ):
@@ -69,13 +69,13 @@ def run_test(self):
69
69
self .wait_for_chainlocked_block_all_nodes (block )
70
70
71
71
self .log .info ("testing normal signing with partially known TX" )
72
- isolate_node ( self .nodes [ 3 ] )
72
+ self .isolate_node ( 3 )
73
73
txid = self .nodes [0 ].sendtoaddress (self .nodes [0 ].getnewaddress (), 1 )
74
74
# Make sure nodes 1 and 2 received the TX before we continue,
75
75
# otherwise it might announce the TX to node 3 when reconnecting
76
76
self .wait_for_tx (txid , self .nodes [1 ])
77
77
self .wait_for_tx (txid , self .nodes [2 ])
78
- reconnect_isolated_node ( self .nodes [ 3 ] , 0 )
78
+ self .reconnect_isolated_node ( 3 , 0 )
79
79
# Make sure nodes actually try re-connecting quorum connections
80
80
self .bump_mocktime (30 )
81
81
self .wait_for_mnauth (self .nodes [3 ], 2 )
@@ -88,26 +88,26 @@ def run_test(self):
88
88
self .wait_for_instantlock (txid , self .nodes [0 ])
89
89
90
90
self .log .info ("testing retroactive signing with unknown TX" )
91
- isolate_node ( self .nodes [ 3 ] )
91
+ self .isolate_node ( 3 )
92
92
rawtx = self .nodes [0 ].createrawtransaction ([], {self .nodes [0 ].getnewaddress (): 1 })
93
93
rawtx = self .nodes [0 ].fundrawtransaction (rawtx )['hex' ]
94
94
rawtx = self .nodes [0 ].signrawtransactionwithwallet (rawtx )['hex' ]
95
95
txid = self .nodes [3 ].sendrawtransaction (rawtx )
96
96
# Make node 3 consider the TX as safe
97
97
self .bump_mocktime (10 * 60 + 1 )
98
98
block = self .nodes [3 ].generatetoaddress (1 , self .nodes [0 ].getnewaddress ())[0 ]
99
- reconnect_isolated_node ( self .nodes [ 3 ] , 0 )
99
+ self .reconnect_isolated_node ( 3 , 0 )
100
100
self .wait_for_chainlocked_block_all_nodes (block )
101
101
self .nodes [0 ].setmocktime (self .mocktime )
102
102
103
103
self .log .info ("testing retroactive signing with partially known TX" )
104
- isolate_node ( self .nodes [ 3 ] )
104
+ self .isolate_node ( 3 )
105
105
txid = self .nodes [0 ].sendtoaddress (self .nodes [0 ].getnewaddress (), 1 )
106
106
# Make sure nodes 1 and 2 received the TX before we continue,
107
107
# otherwise it might announce the TX to node 3 when reconnecting
108
108
self .wait_for_tx (txid , self .nodes [1 ])
109
109
self .wait_for_tx (txid , self .nodes [2 ])
110
- reconnect_isolated_node ( self .nodes [ 3 ] , 0 )
110
+ self .reconnect_isolated_node ( 3 , 0 )
111
111
# Make sure nodes actually try re-connecting quorum connections
112
112
self .bump_mocktime (30 )
113
113
self .wait_for_mnauth (self .nodes [3 ], 2 )
@@ -136,7 +136,7 @@ def cycle_llmqs(self):
136
136
137
137
def test_all_nodes_session_timeout (self , do_cycle_llmqs ):
138
138
set_node_times (self .nodes , self .mocktime )
139
- isolate_node ( self .nodes [ 3 ] )
139
+ self .isolate_node ( 3 )
140
140
rawtx = self .nodes [0 ].createrawtransaction ([], {self .nodes [0 ].getnewaddress (): 1 })
141
141
rawtx = self .nodes [0 ].fundrawtransaction (rawtx )['hex' ]
142
142
rawtx = self .nodes [0 ].signrawtransactionwithwallet (rawtx )['hex' ]
@@ -150,7 +150,7 @@ def test_all_nodes_session_timeout(self, do_cycle_llmqs):
150
150
# Make the signing session for the IS lock timeout on nodes 1-3
151
151
self .bump_mocktime (61 )
152
152
time .sleep (2 ) # make sure Cleanup() is called
153
- reconnect_isolated_node ( self .nodes [ 3 ] , 0 )
153
+ self .reconnect_isolated_node ( 3 , 0 )
154
154
# Make sure nodes actually try re-connecting quorum connections
155
155
self .bump_mocktime (30 )
156
156
self .wait_for_mnauth (self .nodes [3 ], 2 )
@@ -167,7 +167,7 @@ def test_all_nodes_session_timeout(self, do_cycle_llmqs):
167
167
168
168
def test_single_node_session_timeout (self , do_cycle_llmqs ):
169
169
set_node_times (self .nodes , self .mocktime )
170
- isolate_node ( self .nodes [ 3 ] )
170
+ self .isolate_node ( 3 )
171
171
rawtx = self .nodes [0 ].createrawtransaction ([], {self .nodes [0 ].getnewaddress (): 1 })
172
172
rawtx = self .nodes [0 ].fundrawtransaction (rawtx )['hex' ]
173
173
rawtx = self .nodes [0 ].signrawtransactionwithwallet (rawtx )['hex' ]
@@ -176,7 +176,7 @@ def test_single_node_session_timeout(self, do_cycle_llmqs):
176
176
# Make the signing session for the IS lock timeout on node 3
177
177
self .bump_mocktime (61 )
178
178
time .sleep (2 ) # make sure Cleanup() is called
179
- reconnect_isolated_node ( self .nodes [ 3 ] , 0 )
179
+ self .reconnect_isolated_node ( 3 , 0 )
180
180
# Make sure nodes actually try re-connecting quorum connections
181
181
self .bump_mocktime (30 )
182
182
self .wait_for_mnauth (self .nodes [3 ], 2 )
0 commit comments