Skip to content

Commit e9d8cda

Browse files
authored
chore: add a few missing trait bounds (#8731)
1 parent 218526c commit e9d8cda

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

crates/node/api/src/node.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::marker::PhantomData;
1919
/// consensus layer.
2020
///
2121
/// This trait is intended to be stateless and only define the types of the node.
22-
pub trait NodeTypes: Send + Sync + 'static {
22+
pub trait NodeTypes: Send + Sync + Unpin + 'static {
2323
/// The node's primitive types, defining basic operations and structures.
2424
type Primitives: NodePrimitives;
2525
/// The node's engine types, defining the interaction with the consensus engine.
@@ -61,11 +61,17 @@ impl<Types, DB, Provider> Default for FullNodeTypesAdapter<Types, DB, Provider>
6161
}
6262
}
6363

64+
impl<Types, DB, Provider> Clone for FullNodeTypesAdapter<Types, DB, Provider> {
65+
fn clone(&self) -> Self {
66+
Self { types: self.types, db: self.db, provider: self.provider }
67+
}
68+
}
69+
6470
impl<Types, DB, Provider> NodeTypes for FullNodeTypesAdapter<Types, DB, Provider>
6571
where
6672
Types: NodeTypes,
67-
DB: Send + Sync + 'static,
68-
Provider: Send + Sync + 'static,
73+
DB: Send + Sync + Unpin + 'static,
74+
Provider: Send + Sync + Unpin + 'static,
6975
{
7076
type Primitives = Types::Primitives;
7177
type Engine = Types::Engine;

crates/node/builder/src/components/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod pool;
2929
/// - transaction pool
3030
/// - network
3131
/// - payload builder.
32-
pub trait NodeComponents<NodeTypes: FullNodeTypes>: Clone + Send + Sync + 'static {
32+
pub trait NodeComponents<NodeTypes: FullNodeTypes>: Clone + Unpin + Send + Sync + 'static {
3333
/// The transaction pool of the node.
3434
type Pool: TransactionPool + Unpin;
3535

0 commit comments

Comments
 (0)