Skip to content

Commit

Permalink
Use an explicit name for the feature to not mix it with test-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx committed Dec 26, 2024
1 parent 9256358 commit 6a88fc1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 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: 1 addition & 0 deletions benches/benches/transaction_throughput.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Tests throughput of various transaction types
//! `cargo bench --bench transaction_throughput -p fuel-core-benches`
use criterion::{
criterion_group,
Expand Down
2 changes: 1 addition & 1 deletion crates/fuel-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ uuid = { version = "1.1", features = ["v4"] }
[dev-dependencies]
assert_matches = "1.5"
fuel-core = { path = ".", features = ["smt", "test-helpers"] }
fuel-core-executor = { workspace = true, features = ["std", "test-helpers"] }
fuel-core-executor = { workspace = true, features = ["std", "test-helpers", "limited-tx-count"] }
fuel-core-services = { path = "./../services", features = ["test-helpers"] }
fuel-core-storage = { path = "./../storage", features = ["test-helpers"] }
fuel-core-trace = { path = "./../trace" }
Expand Down
1 change: 1 addition & 0 deletions crates/services/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ test-helpers = [
"fuel-core-types/test-helpers",
"fuel-core-storage/test-helpers",
]
limited-tx-count = []
6 changes: 3 additions & 3 deletions crates/services/executor/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ use alloc::{

/// The maximum amount of transactions that can be included in a block,
/// excluding the mint transaction.
#[cfg(not(feature = "test-helpers"))]
#[cfg(not(feature = "limited-tx-count"))]
pub const fn max_tx_count() -> u16 {
u16::MAX.saturating_sub(1)
}
#[cfg(feature = "test-helpers")]
#[cfg(feature = "limited-tx-count")]
pub const fn max_tx_count() -> u16 {
10240
1024
}

pub struct OnceTransactionsSource {
Expand Down
1 change: 1 addition & 0 deletions crates/services/upgradable-executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ test-helpers = [
"fuel-core-storage/test-helpers",
"fuel-core-types/test-helpers",
]
limited-tx-count = ["fuel-core-executor/limited-tx-count"]
3 changes: 1 addition & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ fuel-core = { path = "../crates/fuel-core", default-features = false, features =
"wasm-executor",
"test-helpers",
] }
fuel-core-benches = { path = "../benches" }
fuel-core-bin = { path = "../bin/fuel-core", features = ["parquet", "p2p"] }
fuel-core-client = { path = "../crates/client", features = ["test-helpers"] }
fuel-core-compression = { path = "../crates/compression" }
fuel-core-executor = { workspace = true, features = ["test-helpers"] }
fuel-core-gas-price-service = { path = "../crates/services/gas_price_service" }
fuel-core-p2p = { path = "../crates/services/p2p", features = [
"test-helpers",
Expand Down Expand Up @@ -77,6 +75,7 @@ tokio = { workspace = true, features = [

[dev-dependencies]
pretty_assertions = "1.4"
fuel-core-executor = { workspace = true, features = ["limited-tx-count"] }
proptest = { workspace = true }
tracing = { workspace = true }

Expand Down

0 comments on commit 6a88fc1

Please sign in to comment.