Skip to content

Commit

Permalink
remove qualifer_attr from svm (anza-xyz#1930)
Browse files Browse the repository at this point in the history
* remove qualifer_attr and just use #[cfg(feature = "dev-context-only-utils")]

* update lock file
  • Loading branch information
kevinheavey authored Jul 1, 2024
1 parent 00ee0ac commit b97fa99
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ targets = ["x86_64-unknown-linux-gnu"]
rustc_version = { workspace = true }

[features]
dev-context-only-utils = []
dev-context-only-utils = ["solana-svm/dev-context-only-utils"]
frozen-abi = [
"dep:solana-frozen-abi",
"dep:solana-frozen-abi-macro",
Expand Down
1 change: 0 additions & 1 deletion svm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ edition = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
percentage = { workspace = true }
qualifier_attr = { workspace = true }
serde = { workspace = true, features = ["rc"] }
serde_derive = { workspace = true }
solana-bpf-loader-program = { workspace = true }
Expand Down
11 changes: 6 additions & 5 deletions svm/src/transaction_processor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(feature = "dev-context-only-utils")]
use qualifier_attr::qualifiers;
use {
crate::{
account_loader::{
Expand Down Expand Up @@ -29,7 +27,7 @@ use {
invoke_context::{EnvironmentConfig, InvokeContext},
loaded_programs::{
ForkGraph, ProgramCache, ProgramCacheEntry, ProgramCacheForTxBatch,
ProgramCacheMatchCriteria, ProgramRuntimeEnvironments,
ProgramCacheMatchCriteria,
},
log_collector::LogCollector,
sysvar_cache::SysvarCache,
Expand Down Expand Up @@ -208,8 +206,11 @@ impl<FG: ForkGraph> TransactionBatchProcessor<FG> {

/// Returns the current environments depending on the given epoch
/// Returns None if the call could result in a deadlock
#[cfg_attr(feature = "dev-context-only-utils", qualifiers(pub))]
pub fn get_environments_for_epoch(&self, epoch: Epoch) -> Option<ProgramRuntimeEnvironments> {
#[cfg(feature = "dev-context-only-utils")]
pub fn get_environments_for_epoch(
&self,
epoch: Epoch,
) -> Option<solana_program_runtime::loaded_programs::ProgramRuntimeEnvironments> {
self.program_cache
.try_read()
.ok()
Expand Down

0 comments on commit b97fa99

Please sign in to comment.