Auxiliary data storage in client backend (#849)

* Auxiliary data storage in client backend

* Runtime error handling
This commit is contained in:
Arkadiy Paronyan
2018-10-01 01:10:45 +02:00
committed by Gav Wood
parent 2e728005c9
commit 04cf0072ba
5 changed files with 60 additions and 2 deletions
+4
View File
@@ -119,6 +119,10 @@ where
/// Attempts to revert the chain by `n` blocks. Returns the number of blocks that were
/// successfully reverted.
fn revert(&self, n: NumberFor<Block>) -> error::Result<NumberFor<Block>>;
/// Insert auxiliary data into key-value store.
fn insert_aux<'a, 'b: 'a, 'c: 'a, I: IntoIterator<Item=&'a(&'c [u8], &'c [u8])>, D: IntoIterator<Item=&'a &'b [u8]>>(&self, insert: I, delete: D) -> error::Result<()>;
/// Query auxiliary data from key-value store.
fn get_aux(&self, key: &[u8]) -> error::Result<Option<Vec<u8>>>;
}
/// Mark for all Backend implementations, that are making use of state data, stored locally.