mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: ChainSpec associated type (#10292)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -108,7 +108,7 @@
|
||||
//! ```
|
||||
//! use futures_util::Stream;
|
||||
//! use reth_chain_state::CanonStateNotification;
|
||||
//! use reth_chainspec::{MAINNET, ChainSpecProvider};
|
||||
//! use reth_chainspec::{MAINNET, ChainSpecProvider, ChainSpec};
|
||||
//! use reth_storage_api::{BlockReaderIdExt, StateProviderFactory};
|
||||
//! use reth_tasks::TokioTaskExecutor;
|
||||
//! use reth_tasks::TaskSpawner;
|
||||
@ -118,7 +118,7 @@
|
||||
//! use reth_transaction_pool::maintain::{maintain_transaction_pool_future};
|
||||
//!
|
||||
//! async fn t<C, St>(client: C, stream: St)
|
||||
//! where C: StateProviderFactory + BlockReaderIdExt + ChainSpecProvider + Clone + 'static,
|
||||
//! where C: StateProviderFactory + BlockReaderIdExt + ChainSpecProvider<ChainSpec = ChainSpec> + Clone + 'static,
|
||||
//! St: Stream<Item = CanonStateNotification> + Send + Unpin + 'static,
|
||||
//! {
|
||||
//! let blob_store = InMemoryBlobStore::default();
|
||||
|
||||
@ -12,7 +12,7 @@ use futures_util::{
|
||||
FutureExt, Stream, StreamExt,
|
||||
};
|
||||
use reth_chain_state::CanonStateNotification;
|
||||
use reth_chainspec::ChainSpecProvider;
|
||||
use reth_chainspec::{ChainSpec, ChainSpecProvider};
|
||||
use reth_execution_types::ExecutionOutcome;
|
||||
use reth_fs_util::FsPathError;
|
||||
use reth_primitives::{
|
||||
@ -73,7 +73,12 @@ pub fn maintain_transaction_pool_future<Client, P, St, Tasks>(
|
||||
config: MaintainPoolConfig,
|
||||
) -> BoxFuture<'static, ()>
|
||||
where
|
||||
Client: StateProviderFactory + BlockReaderIdExt + ChainSpecProvider + Clone + Send + 'static,
|
||||
Client: StateProviderFactory
|
||||
+ BlockReaderIdExt
|
||||
+ ChainSpecProvider<ChainSpec = ChainSpec>
|
||||
+ Clone
|
||||
+ Send
|
||||
+ 'static,
|
||||
P: TransactionPoolExt + 'static,
|
||||
St: Stream<Item = CanonStateNotification> + Send + Unpin + 'static,
|
||||
Tasks: TaskSpawner + 'static,
|
||||
@ -94,7 +99,12 @@ pub async fn maintain_transaction_pool<Client, P, St, Tasks>(
|
||||
task_spawner: Tasks,
|
||||
config: MaintainPoolConfig,
|
||||
) where
|
||||
Client: StateProviderFactory + BlockReaderIdExt + ChainSpecProvider + Clone + Send + 'static,
|
||||
Client: StateProviderFactory
|
||||
+ BlockReaderIdExt
|
||||
+ ChainSpecProvider<ChainSpec = ChainSpec>
|
||||
+ Clone
|
||||
+ Send
|
||||
+ 'static,
|
||||
P: TransactionPoolExt + 'static,
|
||||
St: Stream<Item = CanonStateNotification> + Send + Unpin + 'static,
|
||||
Tasks: TaskSpawner + 'static,
|
||||
|
||||
Reference in New Issue
Block a user