new state api state_getKeys to expose storage keys (#1380)

This commit is contained in:
Xiliang Chen
2019-01-12 00:51:19 +13:00
committed by Gav Wood
parent bf51b8a5ad
commit 0e569e6bf2
7 changed files with 56 additions and 0 deletions
@@ -346,6 +346,10 @@ impl<H: Hasher, S: StateBackend<H>, B:Block> StateBackend<H> for CachingState<H,
self.state.pairs()
}
fn keys(&self, prefix: &Vec<u8>) -> Vec<Vec<u8>> {
self.state.keys(prefix)
}
fn try_into_trie_backend(self) -> Option<TrieBackend<Self::TrieBackendStorage, H>> {
self.state.try_into_trie_backend()
}