RPC api for offchain storage (#4694)

* Rpc api for offchain storage

* Replace Vec<u8> to Bytes, replace Mutex to RwLock

* Remove pub

* Modify copyright year
This commit is contained in:
Edwin
2020-01-29 06:31:28 +08:00
committed by GitHub
parent d38e96f2e1
commit 9a6d9f0db5
10 changed files with 218 additions and 9 deletions
@@ -50,6 +50,7 @@ pub trait OffchainStorage: Clone + Send + Sync {
/// A type of supported crypto.
#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, RuntimeDebug, PassByEnum)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
#[repr(C)]
pub enum StorageKind {
/// Persistent storage is non-revertible and not fork-aware. It means that any value