Skip to content

Commit 0799e26

Browse files
committed
fix: add test gating for imports
1 parent e4e5cd0 commit 0799e26

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stacks-signer/src/v0/signer.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use std::collections::HashMap;
1616
use std::fmt::Debug;
1717
use std::sync::mpsc::Sender;
18+
#[cfg(any(test, feature = "testing"))]
1819
use std::sync::LazyLock;
1920
use std::time::{Duration, Instant};
2021

@@ -23,11 +24,15 @@ use blockstack_lib::net::api::postblock_proposal::{
2324
BlockValidateOk, BlockValidateReject, BlockValidateResponse, TOO_MANY_REQUESTS_STATUS,
2425
};
2526
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;
2730
use clarity::types::{PrivateKey, StacksEpochId};
2831
use clarity::util::hash::{MerkleHashFunc, Sha512Trunc256Sum};
2932
use clarity::util::secp256k1::Secp256k1PublicKey;
33+
#[cfg(any(test, feature = "testing"))]
3034
use clarity::util::sleep_ms;
35+
#[cfg(any(test, feature = "testing"))]
3136
use clarity::util::tests::TestFlag;
3237
use libsigner::v0::messages::{
3338
BlockAccepted, BlockRejection, BlockResponse, MessageSlotID, MockProposal, MockSignature,
@@ -49,6 +54,7 @@ use crate::Signer as SignerTrait;
4954

5055
/// A global variable that can be used to make signers repeat their proposal
5156
/// response if their public key is in the provided list
57+
#[cfg(any(test, feature = "testing"))]
5258
pub static TEST_REPEAT_PROPOSAL_RESPONSE: LazyLock<TestFlag<Vec<StacksPublicKey>>> =
5359
LazyLock::new(TestFlag::default);
5460

0 commit comments

Comments
 (0)