From 6a88fc1c10d66cdee660c527e7f1b823589bc42e Mon Sep 17 00:00:00 2001 From: green Date: Thu, 26 Dec 2024 11:43:39 -0500 Subject: [PATCH] Use an explicit name for the feature to not mix it with `test-helpers` --- Cargo.lock | 1 - benches/benches/transaction_throughput.rs | 1 + crates/fuel-core/Cargo.toml | 2 +- crates/services/executor/Cargo.toml | 1 + crates/services/executor/src/executor.rs | 6 +++--- crates/services/upgradable-executor/Cargo.toml | 1 + tests/Cargo.toml | 3 +-- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f785bfaae99..a9a193ba3f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3737,7 +3737,6 @@ dependencies = [ "cynic", "ethers", "fuel-core", - "fuel-core-benches", "fuel-core-bin", "fuel-core-client", "fuel-core-compression", diff --git a/benches/benches/transaction_throughput.rs b/benches/benches/transaction_throughput.rs index c3fb88da35d..4475e9d3759 100644 --- a/benches/benches/transaction_throughput.rs +++ b/benches/benches/transaction_throughput.rs @@ -1,4 +1,5 @@ //! Tests throughput of various transaction types +//! `cargo bench --bench transaction_throughput -p fuel-core-benches` use criterion::{ criterion_group, diff --git a/crates/fuel-core/Cargo.toml b/crates/fuel-core/Cargo.toml index 8e3230df1fc..2fb392dc0c4 100644 --- a/crates/fuel-core/Cargo.toml +++ b/crates/fuel-core/Cargo.toml @@ -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" } diff --git a/crates/services/executor/Cargo.toml b/crates/services/executor/Cargo.toml index 9f3627f07d1..5c96c082f47 100644 --- a/crates/services/executor/Cargo.toml +++ b/crates/services/executor/Cargo.toml @@ -36,3 +36,4 @@ test-helpers = [ "fuel-core-types/test-helpers", "fuel-core-storage/test-helpers", ] +limited-tx-count = [] diff --git a/crates/services/executor/src/executor.rs b/crates/services/executor/src/executor.rs index 42b5201ad87..07c23c8475f 100644 --- a/crates/services/executor/src/executor.rs +++ b/crates/services/executor/src/executor.rs @@ -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 { diff --git a/crates/services/upgradable-executor/Cargo.toml b/crates/services/upgradable-executor/Cargo.toml index 16eeb0fc391..819253f449d 100644 --- a/crates/services/upgradable-executor/Cargo.toml +++ b/crates/services/upgradable-executor/Cargo.toml @@ -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"] diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 291f41ab7d7..df09812da7b 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -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", @@ -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 }