15
15
use std:: collections:: HashMap ;
16
16
use std:: fmt:: Debug ;
17
17
use std:: sync:: mpsc:: Sender ;
18
+ #[ cfg( any( test, feature = "testing" ) ) ]
18
19
use std:: sync:: LazyLock ;
19
20
use std:: time:: { Duration , Instant } ;
20
21
@@ -23,11 +24,15 @@ use blockstack_lib::net::api::postblock_proposal::{
23
24
BlockValidateOk , BlockValidateReject , BlockValidateResponse , TOO_MANY_REQUESTS_STATUS ,
24
25
} ;
25
26
use blockstack_lib:: util_lib:: db:: Error as DBError ;
26
- use clarity:: types:: chainstate:: { StacksPrivateKey , StacksPublicKey } ;
27
+ use clarity:: types:: chainstate:: StacksPrivateKey ;
28
+ #[ cfg( any( test, feature = "testing" ) ) ]
29
+ use clarity:: types:: chainstate:: StacksPublicKey ;
27
30
use clarity:: types:: { PrivateKey , StacksEpochId } ;
28
31
use clarity:: util:: hash:: { MerkleHashFunc , Sha512Trunc256Sum } ;
29
32
use clarity:: util:: secp256k1:: Secp256k1PublicKey ;
33
+ #[ cfg( any( test, feature = "testing" ) ) ]
30
34
use clarity:: util:: sleep_ms;
35
+ #[ cfg( any( test, feature = "testing" ) ) ]
31
36
use clarity:: util:: tests:: TestFlag ;
32
37
use libsigner:: v0:: messages:: {
33
38
BlockAccepted , BlockRejection , BlockResponse , MessageSlotID , MockProposal , MockSignature ,
@@ -49,6 +54,7 @@ use crate::Signer as SignerTrait;
49
54
50
55
/// A global variable that can be used to make signers repeat their proposal
51
56
/// response if their public key is in the provided list
57
+ #[ cfg( any( test, feature = "testing" ) ) ]
52
58
pub static TEST_REPEAT_PROPOSAL_RESPONSE : LazyLock < TestFlag < Vec < StacksPublicKey > > > =
53
59
LazyLock :: new ( TestFlag :: default) ;
54
60
0 commit comments