diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba27ab235e5..32f077565ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ concurrency: env: CARGO_TERM_COLOR: always RUST_VERSION: 1.72.0 - NIGHTLY_RUST_VERSION: nightly-2023-08-28 + NIGHTLY_RUST_VERSION: nightly-2023-10-29 RUSTFLAGS: -D warnings REGISTRY: ghcr.io SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 diff --git a/crates/fuel-core/src/service/adapters/producer.rs b/crates/fuel-core/src/service/adapters/producer.rs index 007060dd445..5e0e35ad569 100644 --- a/crates/fuel-core/src/service/adapters/producer.rs +++ b/crates/fuel-core/src/service/adapters/producer.rs @@ -22,7 +22,9 @@ use fuel_core_storage::{ use fuel_core_types::{ blockchain::{ block::CompressedBlock, - primitives::{self,}, + primitives::{ + self, + }, }, fuel_tx, fuel_tx::Receipt, diff --git a/crates/fuel-core/src/state/rocks_db.rs b/crates/fuel-core/src/state/rocks_db.rs index d895b129d3f..50235b5fdee 100644 --- a/crates/fuel-core/src/state/rocks_db.rs +++ b/crates/fuel-core/src/state/rocks_db.rs @@ -63,11 +63,10 @@ impl RocksDb { columns: Vec, capacity: Option, ) -> DatabaseResult { - let cf_descriptors: Vec<_> = columns + let cf_descriptors = columns .clone() .into_iter() - .map(|i| ColumnFamilyDescriptor::new(RocksDb::col_name(i), Self::cf_opts(i))) - .collect(); + .map(|i| ColumnFamilyDescriptor::new(RocksDb::col_name(i), Self::cf_opts(i))); let mut opts = Options::default(); opts.create_if_missing(true); @@ -77,8 +76,6 @@ impl RocksDb { opts.set_row_cache(&cache); } - DB::repair(&opts, &path).map_err(|e| DatabaseError::Other(e.into()))?; - let db = match DB::open_cf_descriptors(&opts, &path, cf_descriptors) { Err(_) => { // setup cfs @@ -91,7 +88,18 @@ impl RocksDb { } Ok(db) } - err => err, + _ => { + DB::repair(&opts, &path) + .map_err(|e| DatabaseError::Other(e.into()))?; + + let cf_descriptors = columns.clone().into_iter().map(|i| { + ColumnFamilyDescriptor::new( + RocksDb::col_name(i), + Self::cf_opts(i), + ) + }); + DB::open_cf_descriptors(&opts, &path, cf_descriptors) + } } } ok => ok, diff --git a/crates/services/p2p/src/config.rs b/crates/services/p2p/src/config.rs index 54f7752d05b..789a929b2d7 100644 --- a/crates/services/p2p/src/config.rs +++ b/crates/services/p2p/src/config.rs @@ -16,7 +16,9 @@ use libp2p::{ Keypair, }, mplex, - noise::{self,}, + noise::{ + self, + }, tcp::{ tokio::Transport as TokioTcpTransport, Config as TcpConfig,