Skip to content

Commit 399421a

Browse files
authored
Derive Clone for AlwaysCanAuthor, NeverCanAuthor, CanAuthorWithNativeVersion (paritytech#6906)
1 parent 287ecc2 commit 399421a

File tree

1 file changed

+3
-0
lines changed
  • primitives/consensus/common/src

1 file changed

+3
-0
lines changed

primitives/consensus/common/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ pub trait CanAuthorWith<Block: BlockT> {
212212

213213
/// Checks if the node can author blocks by using
214214
/// [`NativeVersion::can_author_with`](sp_version::NativeVersion::can_author_with).
215+
#[derive(Clone)]
215216
pub struct CanAuthorWithNativeVersion<T>(T);
216217

217218
impl<T> CanAuthorWithNativeVersion<T> {
@@ -239,6 +240,7 @@ impl<T: sp_version::GetRuntimeVersion<Block>, Block: BlockT> CanAuthorWith<Block
239240
}
240241

241242
/// Returns always `true` for `can_author_with`. This is useful for tests.
243+
#[derive(Clone)]
242244
pub struct AlwaysCanAuthor;
243245

244246
impl<Block: BlockT> CanAuthorWith<Block> for AlwaysCanAuthor {
@@ -248,6 +250,7 @@ impl<Block: BlockT> CanAuthorWith<Block> for AlwaysCanAuthor {
248250
}
249251

250252
/// Never can author.
253+
#[derive(Clone)]
251254
pub struct NeverCanAuthor;
252255

253256
impl<Block: BlockT> CanAuthorWith<Block> for NeverCanAuthor {

0 commit comments

Comments
 (0)