From 93c73b6509a96ac18b908a3e5a51aa6813f85adf Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 17 Aug 2020 21:07:30 +0200 Subject: [PATCH] Derive Clone for AlwaysCanAuthor, NeverCanAuthor, CanAuthorWithNativeVersion (#6906) --- substrate/primitives/consensus/common/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substrate/primitives/consensus/common/src/lib.rs b/substrate/primitives/consensus/common/src/lib.rs index 0e4dd91dd4..fa4f233c68 100644 --- a/substrate/primitives/consensus/common/src/lib.rs +++ b/substrate/primitives/consensus/common/src/lib.rs @@ -212,6 +212,7 @@ pub trait CanAuthorWith { /// Checks if the node can author blocks by using /// [`NativeVersion::can_author_with`](sp_version::NativeVersion::can_author_with). +#[derive(Clone)] pub struct CanAuthorWithNativeVersion(T); impl CanAuthorWithNativeVersion { @@ -239,6 +240,7 @@ impl, Block: BlockT> CanAuthorWith CanAuthorWith for AlwaysCanAuthor { @@ -248,6 +250,7 @@ impl CanAuthorWith for AlwaysCanAuthor { } /// Never can author. +#[derive(Clone)] pub struct NeverCanAuthor; impl CanAuthorWith for NeverCanAuthor {