|
3 | 3 | //! - would_fit(&tx_cost), immutable function to test if tx with tx_cost would fit into current block |
4 | 4 | //! - add_transaction_cost(&tx_cost), mutable function to accumulate tx_cost to tracker. |
5 | 5 | //! |
6 | | -#[cfg(feature = "post-analysis")] |
7 | | -use crate::cost_tracker_post_analysis::CostTrackerPostAnalysis; |
8 | 6 | 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 | + }, |
10 | 11 | solana_metrics::datapoint_info, |
11 | 12 | solana_pubkey::Pubkey, |
12 | 13 | solana_runtime_transaction::transaction_with_meta::TransactionWithMeta, |
@@ -438,7 +439,6 @@ impl CostTracker { |
438 | 439 | /// Implement the trait for the cost tracker |
439 | 440 | /// This is only used for post-analysis to avoid lock contention |
440 | 441 | /// Do not use in the hot path |
441 | | -#[cfg(feature = "post-analysis")] |
442 | 442 | impl CostTrackerPostAnalysis for CostTracker { |
443 | 443 | fn get_cost_by_writable_accounts(&self) -> &HashMap<Pubkey, u64, ahash::RandomState> { |
444 | 444 | &self.cost_by_writable_accounts |
@@ -1012,7 +1012,6 @@ mod tests { |
1012 | 1012 | } |
1013 | 1013 |
|
1014 | 1014 | #[test] |
1015 | | - #[cfg(feature = "post-analysis")] |
1016 | 1015 | fn test_get_cost_by_writable_accounts_post_analysis() { |
1017 | 1016 | let mut cost_tracker = CostTracker::default(); |
1018 | 1017 | let cost = 100u64; |
|
0 commit comments