-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.rs
More file actions
36 lines (32 loc) · 989 Bytes
/
utils.rs
File metadata and controls
36 lines (32 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use reth::{primitives::EthPrimitives, providers::providers::ProviderNodeTypes};
use reth_chainspec::ChainSpec;
use reth_db::mdbx;
use std::sync::Arc;
/// Convenience trait for specifying the [`ProviderNodeTypes`] implementation
/// required for Signet functionality. This is used to condense many trait
/// bounds.
pub trait Pnt:
ProviderNodeTypes<ChainSpec = ChainSpec, Primitives = EthPrimitives, DB = Arc<mdbx::DatabaseEnv>>
{
}
impl<T> Pnt for T where
T: ProviderNodeTypes<
ChainSpec = ChainSpec,
Primitives = EthPrimitives,
DB = Arc<mdbx::DatabaseEnv>,
>
{
}
/// Convenience trait to aggregate the DB requirements
pub trait NodeTypesDbTrait:
reth_db::database::Database + reth_db::database_metrics::DatabaseMetrics + Clone + Unpin + 'static
{
}
impl<T> NodeTypesDbTrait for T where
T: reth_db::database::Database
+ reth_db::database_metrics::DatabaseMetrics
+ Clone
+ Unpin
+ 'static
{
}