@@ -18,11 +18,11 @@ use std::collections::HashSet;
18
18
use std:: fs;
19
19
use std:: io:: Read ;
20
20
use std:: sync:: mpsc:: { Receiver , RecvTimeoutError } ;
21
+ #[ cfg( test) ]
22
+ use std:: sync:: LazyLock ;
21
23
use std:: thread:: JoinHandle ;
22
24
use std:: time:: { Duration , Instant } ;
23
25
24
- #[ cfg( test) ]
25
- use lazy_static:: lazy_static;
26
26
use rand:: { thread_rng, Rng } ;
27
27
use stacks:: burnchains:: { Burnchain , Txid } ;
28
28
use stacks:: chainstate:: burn:: db:: sortdb:: SortitionDB ;
@@ -72,13 +72,13 @@ use crate::run_loop::RegisteredKey;
72
72
use crate :: BitcoinRegtestController ;
73
73
74
74
#[ cfg( test) ]
75
- lazy_static ! {
76
- /// Mutex to stall the relayer thread right before it creates a miner thread.
77
- pub static ref TEST_MINER_THREAD_STALL : TestFlag <bool > = TestFlag :: default ( ) ;
75
+ /// Mutex to stall the relayer thread right before it creates a miner thread.
76
+ pub static TEST_MINER_THREAD_STALL : LazyLock < TestFlag < bool > > = LazyLock :: new ( TestFlag :: default) ;
78
77
79
- /// Mutex to stall the miner thread right after it starts up (does not block the relayer thread)
80
- pub static ref TEST_MINER_THREAD_START_STALL : TestFlag <bool > = TestFlag :: default ( ) ;
81
- }
78
+ #[ cfg( test) ]
79
+ /// Mutex to stall the miner thread right after it starts up (does not block the relayer thread)
80
+ pub static TEST_MINER_THREAD_START_STALL : LazyLock < TestFlag < bool > > =
81
+ LazyLock :: new ( TestFlag :: default) ;
82
82
83
83
/// Command types for the Nakamoto relayer thread, issued to it by other threads
84
84
#[ allow( clippy:: large_enum_variant) ]
0 commit comments