@@ -218,16 +218,6 @@ impl MinerStopHandle {
218
218
self . join_handle
219
219
}
220
220
221
- /// Set the miner-abort flag to true, which causes the miner thread to exit if it is blocked.
222
- pub fn set_abort_flag ( & self ) {
223
- self . abort_flag . store ( true , Ordering :: SeqCst ) ;
224
- }
225
-
226
- /// Get an Arc to the abort flag, so another thread can set it.
227
- pub fn get_abort_flag ( & self ) -> Arc < AtomicBool > {
228
- self . abort_flag . clone ( )
229
- }
230
-
231
221
/// Stop the inner miner thread.
232
222
/// Blocks the miner, and sets the abort flag so that a blocked miner will error out.
233
223
pub fn stop ( self , globals : & Globals ) -> Result < ( ) , NakamotoNodeError > {
@@ -238,7 +228,7 @@ impl MinerStopHandle {
238
228
& my_id, & prior_thread_id
239
229
) ;
240
230
241
- self . set_abort_flag ( ) ;
231
+ self . abort_flag . store ( true , Ordering :: SeqCst ) ;
242
232
globals. block_miner ( ) ;
243
233
244
234
let prior_miner = self . into_inner ( ) ;
@@ -1109,7 +1099,7 @@ impl RelayerThread {
1109
1099
reason,
1110
1100
burn_tip_at_start,
1111
1101
) ?;
1112
- let miner_abort_flag = new_miner_state. get_abort_flag ( ) ;
1102
+ let miner_abort_flag = new_miner_state. abort_flag . clone ( ) ;
1113
1103
1114
1104
debug ! ( "Relayer: starting new tenure thread" ) ;
1115
1105
@@ -1155,7 +1145,7 @@ impl RelayerThread {
1155
1145
self . miner_thread_burn_view = None ;
1156
1146
1157
1147
let id = prior_tenure_thread. inner_thread ( ) . id ( ) ;
1158
- let abort_flag = prior_tenure_thread. get_abort_flag ( ) ;
1148
+ let abort_flag = prior_tenure_thread. abort_flag . clone ( ) ;
1159
1149
let globals = self . globals . clone ( ) ;
1160
1150
1161
1151
let stop_handle = std:: thread:: Builder :: new ( )
0 commit comments