chore(root): cleanup some debt (#13427)

This commit is contained in:
Roman Krasiuk
2024-12-17 16:14:50 +01:00
committed by GitHub
parent abc4ff9779
commit e663f959b8
3 changed files with 4 additions and 10 deletions

View File

@ -58,6 +58,7 @@ reth-metrics = { workspace = true, features = ["common"] }
# misc
rayon.workspace = true
tracing.workspace = true
derive_more.workspace = true
# optional deps for test-utils
reth-prune-types = { workspace = true, optional = true }

View File

@ -1,6 +1,7 @@
//! State root task related functionality.
use alloy_primitives::map::HashSet;
use derive_more::derive::Deref;
use rayon::iter::{ParallelBridge, ParallelIterator};
use reth_errors::ProviderError;
use reth_evm::system_calls::OnStateHook;
@ -22,7 +23,6 @@ use reth_trie_sparse::{
use revm_primitives::{keccak256, EvmState, B256};
use std::{
collections::BTreeMap,
ops::Deref,
sync::{
mpsc::{self, channel, Receiver, Sender},
Arc,
@ -185,6 +185,7 @@ impl ProofSequencer {
/// A wrapper for the sender that signals completion when dropped
#[allow(dead_code)]
#[derive(Deref)]
pub(crate) struct StateHookSender<BPF: BlindedProviderFactory>(Sender<StateRootMessage<BPF>>);
#[allow(dead_code)]
@ -194,14 +195,6 @@ impl<BPF: BlindedProviderFactory> StateHookSender<BPF> {
}
}
impl<BPF: BlindedProviderFactory> Deref for StateHookSender<BPF> {
type Target = Sender<StateRootMessage<BPF>>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<BPF: BlindedProviderFactory> Drop for StateHookSender<BPF> {
fn drop(&mut self) {
// Send completion signal when the sender is dropped
@ -355,7 +348,6 @@ where
// TODO: replace with parallel proof
let result = Proof::overlay_multiproof(
provider.tx_ref(),
// TODO(alexey): this clone can be expensive, we should avoid it
input.as_ref().clone(),
proof_targets.clone(),
);