Skip to content

Commit bbbedd1

Browse files
committed
Error on startup if --historical-execution passed without RocksDB
1 parent d3984ca commit bbbedd1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

crates/fuel-core/src/service/sub_services.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,19 @@ pub fn init_sub_services(
103103

104104
let last_height = *last_block_header.height();
105105

106-
let allow_historical_execution = config.combined_db_config.database_type
107-
== DbType::RocksDb
108-
&& config.historical_execution;
106+
if config.historical_execution
107+
&& config.combined_db_config.database_type != DbType::RocksDb
108+
{
109+
return Err(anyhow::anyhow!(
110+
"Historical execution is only supported with RocksDB"
111+
));
112+
}
113+
109114
let upgradable_executor_config = fuel_core_upgradable_executor::config::Config {
110115
backtrace: config.vm.backtrace,
111116
utxo_validation_default: config.utxo_validation,
112117
native_executor_version: config.native_executor_version,
113-
allow_historical_execution,
118+
allow_historical_execution: config.historical_execution,
114119
};
115120
let executor = ExecutorAdapter::new(
116121
database.on_chain().clone(),

0 commit comments

Comments
 (0)