mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-01 10:35:05 -05:00
Fix: manually impl Clone for BlockchainProvider (#8474)
This commit is contained in:
@@ -65,7 +65,6 @@ pub use consistent_view::{ConsistentDbView, ConsistentViewError};
|
||||
/// This type serves as the main entry point for interacting with the blockchain and provides data
|
||||
/// from database storage and from the blockchain tree (pending state etc.) It is a simple wrapper
|
||||
/// type that holds an instance of the database and the blockchain tree.
|
||||
#[derive(Clone)]
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct BlockchainProvider<DB> {
|
||||
/// Provider type used to access the database.
|
||||
@@ -76,6 +75,16 @@ pub struct BlockchainProvider<DB> {
|
||||
chain_info: ChainInfoTracker,
|
||||
}
|
||||
|
||||
impl<DB> Clone for BlockchainProvider<DB> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
database: self.database.clone(),
|
||||
tree: self.tree.clone(),
|
||||
chain_info: self.chain_info.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<DB> BlockchainProvider<DB> {
|
||||
/// Create new provider instance that wraps the database and the blockchain tree, using the
|
||||
/// provided latest header to initialize the chain info tracker.
|
||||
|
||||
Reference in New Issue
Block a user