feat(exex): WAL handle (#11266)

This commit is contained in:
Alexey Shekhirin
2024-09-27 10:10:35 +01:00
committed by GitHub
parent 37b0c56b85
commit 67221247c5
9 changed files with 212 additions and 121 deletions

View File

@ -20,7 +20,7 @@ use reth_db_common::init::init_genesis;
use reth_ethereum_engine_primitives::EthereumEngineValidator;
use reth_evm::test_utils::MockExecutorProvider;
use reth_execution_types::Chain;
use reth_exex::{ExExContext, ExExEvent, ExExNotification, ExExNotifications};
use reth_exex::{ExExContext, ExExEvent, ExExNotification, ExExNotifications, Wal};
use reth_network::{config::SecretKey, NetworkConfigBuilder, NetworkManager};
use reth_node_api::{
FullNodeTypes, FullNodeTypesAdapter, NodeTypes, NodeTypesWithDBAdapter, NodeTypesWithEngine,
@ -49,6 +49,7 @@ use reth_provider::{
use reth_tasks::TaskManager;
use reth_transaction_pool::test_utils::{testing_pool, TestPool};
use std::{
env::temp_dir,
fmt::Debug,
future::{poll_fn, Future},
sync::Arc,
@ -310,6 +311,8 @@ pub async fn test_exex_context_with_chain_spec(
components.provider.clone(),
components.components.executor.clone(),
notifications_rx,
// TODO(alexey): do we want to expose WAL to the user?
Wal::new(temp_dir())?.handle(),
);
let ctx = ExExContext {