Skip to content

Commit fb8f0b2

Browse files
committed
Pass new feature flag to dockerfile
1 parent 2391d2e commit fb8f0b2

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

cmd/ethrex/initializers.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,14 @@ pub async fn init_store(data_dir: &str, network: &str) -> Store {
9696

9797
#[cfg(feature = "l2")]
9898
pub async fn init_rollup_store(data_dir: &str) -> StoreRollup {
99-
cfg_if::cfg_if! {
100-
if #[cfg(feature = "rollup_storage_redb")] {
101-
let engine_type = EngineTypeRollup::RedB;
102-
} else if #[cfg(feature = "rollup_storage_libmdbx")] {
103-
let engine_type = EngineTypeRollup::Libmdbx;
104-
} else {
105-
let engine_type = EngineTypeRollup::InMemory;
106-
.expect("Failed to create StoreRollup")
107-
}
108-
}
99+
let engine_type = if cfg!(feature = "rollup_storage_redb") {
100+
EngineTypeRollup::RedB
101+
} else if cfg!(feature = "rollup_storage_libmdbx") {
102+
EngineTypeRollup::Libmdbx
103+
} else {
104+
EngineTypeRollup::InMemory
105+
};
106+
109107
StoreRollup::new(data_dir, engine_type).expect("Failed to create StoreRollup")
110108
}
111109

crates/l2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ COPY --from=planner /ethrex/recipe.json recipe.json
2222
RUN cargo chef cook --release --recipe-path recipe.json
2323

2424
COPY . .
25-
RUN cargo build --release --features l2
25+
RUN cargo build --release --features "l2,rollup_storage_libmdbx"
2626

2727
FROM ubuntu:24.04
2828
ENV CI_ETHREX_WORKDIR=$CI_ETHREX_WORKDIR

0 commit comments

Comments
 (0)