diff --git a/client/api/src/in_mem.rs b/client/api/src/in_mem.rs index 27a74ddd79ed6..0a29a4dbaae5c 100644 --- a/client/api/src/in_mem.rs +++ b/client/api/src/in_mem.rs @@ -114,6 +114,7 @@ struct BlockchainStorage { } /// In-memory blockchain. Supports concurrent reads. +#[derive(Clone)] pub struct Blockchain { storage: Arc>>, } @@ -124,13 +125,6 @@ impl Default for Blockchain { } } -impl Clone for Blockchain { - fn clone(&self) -> Self { - let storage = Arc::new(RwLock::new(self.storage.read().clone())); - Blockchain { storage } - } -} - impl Blockchain { /// Get header hash of given block. pub fn id(&self, id: BlockId) -> Option {