Skip to content

Commit d14414e

Browse files
committed
Revert "gate behind a feature"
This reverts commit b927337.
1 parent b927337 commit d14414e

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

cost-model/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ frozen-abi = [
3131
"solana-pubkey/frozen-abi",
3232
"solana-vote-program/frozen-abi",
3333
]
34-
post-analysis = []
3534

3635
[dependencies]
3736
agave-feature-set = { workspace = true }

cost-model/src/cost_tracker.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
//! - would_fit(&tx_cost), immutable function to test if tx with tx_cost would fit into current block
44
//! - add_transaction_cost(&tx_cost), mutable function to accumulate tx_cost to tracker.
55
//!
6-
#[cfg(feature = "post-analysis")]
7-
use crate::cost_tracker_post_analysis::CostTrackerPostAnalysis;
86
use {
9-
crate::{block_cost_limits::*, transaction_cost::TransactionCost},
7+
crate::{
8+
block_cost_limits::*, cost_tracker_post_analysis::CostTrackerPostAnalysis,
9+
transaction_cost::TransactionCost,
10+
},
1011
solana_metrics::datapoint_info,
1112
solana_pubkey::Pubkey,
1213
solana_runtime_transaction::transaction_with_meta::TransactionWithMeta,
@@ -438,7 +439,6 @@ impl CostTracker {
438439
/// Implement the trait for the cost tracker
439440
/// This is only used for post-analysis to avoid lock contention
440441
/// Do not use in the hot path
441-
#[cfg(feature = "post-analysis")]
442442
impl CostTrackerPostAnalysis for CostTracker {
443443
fn get_cost_by_writable_accounts(&self) -> &HashMap<Pubkey, u64, ahash::RandomState> {
444444
&self.cost_by_writable_accounts
@@ -1012,7 +1012,6 @@ mod tests {
10121012
}
10131013

10141014
#[test]
1015-
#[cfg(feature = "post-analysis")]
10161015
fn test_get_cost_by_writable_accounts_post_analysis() {
10171016
let mut cost_tracker = CostTracker::default();
10181017
let cost = 100u64;

cost-model/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
pub mod block_cost_limits;
55
pub mod cost_model;
66
pub mod cost_tracker;
7-
#[cfg(feature = "post-analysis")]
87
pub mod cost_tracker_post_analysis;
98
pub mod transaction_cost;
109

0 commit comments

Comments
 (0)