diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 8dc314ae6..fbdef0bae 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -82,6 +82,9 @@ test-case = { workspace = true } [build-dependencies] rustc_version = { workspace = true } +[features] +dev-context-only-utils = [] + [lib] crate-type = ["lib"] name = "solana_ledger" diff --git a/ledger/src/blockstore_meta.rs b/ledger/src/blockstore_meta.rs index 65a5c2c2e..71755b3ac 100644 --- a/ledger/src/blockstore_meta.rs +++ b/ledger/src/blockstore_meta.rs @@ -289,7 +289,8 @@ impl SlotMeta { self.is_connected() } - /// Dangerous. Currently only needed for a local-cluster test + /// Dangerous. + #[cfg(feature = "dev-context-only-utils")] pub fn unset_parent(&mut self) { self.parent_slot = None; } diff --git a/local-cluster/Cargo.toml b/local-cluster/Cargo.toml index 9c856882f..05e0772a7 100644 --- a/local-cluster/Cargo.toml +++ b/local-cluster/Cargo.toml @@ -41,6 +41,7 @@ fs_extra = { workspace = true } gag = { workspace = true } serial_test = { workspace = true } solana-download-utils = { workspace = true } +solana-ledger = { workspace = true, features = ["dev-context-only-utils"] } solana-logger = { workspace = true } [package.metadata.docs.rs]