chore: move EventSender out of BeaconConsensusEngineHandle (#13533)

This commit is contained in:
Arsenii Kulikov
2024-12-24 02:44:19 +04:00
committed by GitHub
parent 6822d4f18b
commit c6d42ad8c4
5 changed files with 8 additions and 23 deletions

View File

@@ -1031,7 +1031,6 @@ mod tests {
use super::*;
use alloy_rpc_types_engine::{ClientCode, ClientVersionV1};
use assert_matches::assert_matches;
use reth_beacon_consensus::BeaconConsensusEngineEvent;
use reth_chainspec::{ChainSpec, MAINNET};
use reth_engine_primitives::BeaconEngineMessage;
use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator};
@@ -1041,7 +1040,6 @@ mod tests {
use reth_rpc_types_compat::engine::payload::execution_payload_from_sealed_block;
use reth_tasks::TokioTaskExecutor;
use reth_testing_utils::generators::random_block;
use reth_tokio_util::EventSender;
use reth_transaction_pool::noop::NoopTransactionPool;
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver};
@@ -1066,12 +1064,11 @@ mod tests {
let provider = Arc::new(MockEthProvider::default());
let payload_store = spawn_test_payload_service();
let (to_engine, engine_rx) = unbounded_channel();
let event_sender: EventSender<BeaconConsensusEngineEvent> = Default::default();
let task_executor = Box::<TokioTaskExecutor>::default();
let api = EngineApi::new(
provider.clone(),
chain_spec.clone(),
BeaconConsensusEngineHandle::new(to_engine, event_sender),
BeaconConsensusEngineHandle::new(to_engine),
payload_store.into(),
NoopTransactionPool::default(),
task_executor,