feat: run StaticFileProvider::check_consistency on start up (#8143)

This commit is contained in:
joshieDo
2024-06-01 12:56:13 +02:00
committed by GitHub
parent 105570ded0
commit a4df6bbd62
58 changed files with 1335 additions and 262 deletions

View File

@ -8,7 +8,10 @@ use alloy_rlp::Decodable;
use rayon::iter::{ParallelBridge, ParallelIterator};
use reth_db::test_utils::{create_test_rw_db, create_test_static_files_dir};
use reth_primitives::{BlockBody, SealedBlock, StaticFileSegment};
use reth_provider::{providers::StaticFileWriter, HashingWriter, ProviderFactory};
use reth_provider::{
providers::{StaticFileProvider, StaticFileWriter},
HashingWriter, ProviderFactory,
};
use reth_stages::{stages::ExecutionStage, ExecInput, Stage};
use std::{collections::BTreeMap, fs, path::Path, sync::Arc};
@ -86,8 +89,8 @@ impl Case for BlockchainTestCase {
let provider = ProviderFactory::new(
db.as_ref(),
Arc::new(case.network.clone().into()),
static_files_dir_path,
)?
StaticFileProvider::read_write(static_files_dir_path).unwrap(),
)
.provider_rw()
.unwrap();