feat: add Receipt AT to writer traits (#12892)

This commit is contained in:
Arsenii Kulikov
2024-11-27 19:31:13 +04:00
committed by GitHub
parent 1131bdecc3
commit 7a6a725d91
24 changed files with 211 additions and 161 deletions

View File

@ -28,7 +28,10 @@ pub(crate) async fn dump_execution_stage<N, E>(
where
N: ProviderNodeTypes<
DB = Arc<DatabaseEnv>,
Primitives: NodePrimitives<Block = reth_primitives::Block>,
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
E: BlockExecutorProvider,
{
@ -136,7 +139,12 @@ fn import_tables_with_range<N: NodeTypesWithDB>(
/// `PlainAccountState` safely. There might be some state dependency from an address
/// which hasn't been changed in the given range.
fn unwind_and_copy<
N: ProviderNodeTypes<Primitives: NodePrimitives<Block = reth_primitives::Block>>,
N: ProviderNodeTypes<
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
>(
db_tool: &DbTool<N>,
from: u64,
@ -174,7 +182,12 @@ fn dry_run<N, E>(
executor: E,
) -> eyre::Result<()>
where
N: ProviderNodeTypes<Primitives: NodePrimitives<Block = reth_primitives::Block>>,
N: ProviderNodeTypes<
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
E: BlockExecutorProvider,
{
info!(target: "reth::cli", "Executing stage. [dry-run]");

View File

@ -28,7 +28,10 @@ use tracing::info;
pub(crate) async fn dump_merkle_stage<
N: ProviderNodeTypes<
DB = Arc<DatabaseEnv>,
Primitives: NodePrimitives<Block = reth_primitives::Block>,
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
>(
db_tool: &DbTool<N>,
@ -74,7 +77,12 @@ pub(crate) async fn dump_merkle_stage<
/// Dry-run an unwind to FROM block and copy the necessary table data to the new database.
fn unwind_and_copy<
N: ProviderNodeTypes<Primitives: NodePrimitives<Block = reth_primitives::Block>>,
N: ProviderNodeTypes<
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
>(
db_tool: &DbTool<N>,
range: (u64, u64),