Skip to content

Commit

Permalink
fix(rocksdb): import when rocksdb is enabled within local_node_with_r…
Browse files Browse the repository at this point in the history
…eader fn (#2626)

## Linked Issues/PRs
<!-- List of related issues/PRs -->
reported by @hal3e 

## Description
<!-- List of detailed changes -->

## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [ ] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here

### After merging, notify other teams

[Add or remove entries as needed]

- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [ ] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)
- [ ] Someone else?
  • Loading branch information
rymnc authored Jan 24, 2025
1 parent 949e24b commit d502afe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/fuel-core/src/service/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ impl Config {

#[cfg(feature = "test-helpers")]
pub fn local_node_with_reader(snapshot_reader: SnapshotReader) -> Self {
use crate::state::rocks_db::DatabaseConfig;
let block_importer = fuel_core_importer::Config::new(false);
let latest_block = snapshot_reader.last_block_config();
// In tests, we always want to use the native executor as a default configuration.
Expand All @@ -135,7 +134,7 @@ impl Config {

let combined_db_config = CombinedDatabaseConfig {
#[cfg(feature = "rocksdb")]
database_config: DatabaseConfig::config_for_tests(),
database_config: crate::state::rocks_db::DatabaseConfig::config_for_tests(),
database_path: Default::default(),
#[cfg(feature = "rocksdb")]
database_type: DbType::RocksDb,
Expand Down

0 comments on commit d502afe

Please sign in to comment.