From 83b148f514234759652f57493313d843e2cef34d Mon Sep 17 00:00:00 2001 From: Pierre Krieger <pierre.krieger1708@gmail.com> Date: Sat, 3 Aug 2019 10:33:53 +0200 Subject: [PATCH] Mention that in_mem::Backend doesn't work (#3250) * Mention that in_mem::Backend doesn't work * Bigger warning --- substrate/core/client/src/in_mem.rs | 5 ++++- substrate/core/client/src/lib.rs | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/substrate/core/client/src/in_mem.rs b/substrate/core/client/src/in_mem.rs index d392fbe9b21..c43c4e3197e 100644 --- a/substrate/core/client/src/in_mem.rs +++ b/substrate/core/client/src/in_mem.rs @@ -532,7 +532,10 @@ where } } -/// In-memory backend. Keeps all states and blocks in memory. Useful for testing. +/// In-memory backend. Keeps all states and blocks in memory. +/// +/// > **Warning**: Doesn't support all the features necessary for a proper database. Only use this +/// > struct for testing purposes. Do **NOT** use in production. pub struct Backend<Block, H> where Block: BlockT, diff --git a/substrate/core/client/src/lib.rs b/substrate/core/client/src/lib.rs index a1351f20e46..aa16e20cd8e 100644 --- a/substrate/core/client/src/lib.rs +++ b/substrate/core/client/src/lib.rs @@ -28,8 +28,7 @@ //! Creating a [`Client`] is done by calling the `new` method and passing to it a //! [`Backend`](backend::Backend) and an [`Executor`](CallExecutor). //! -//! The former is typically provided by the `substrate-client-db` crate, but [`in_mem::Backend`] -//! can be used for testing purposes. +//! The former is typically provided by the `substrate-client-db` crate. //! //! The latter typically requires passing one of: //! -- GitLab