Value lifetime is returned from blockchain cache (#3403)

* value range in blockchain cache

* revert me (testing for spurious failure)

* Revert "revert me (testing for spurious failure)"

This reverts commit 21a4a3cf5ee14e003541b779c41351e4f5e1122a.
This commit is contained in:
Svyatoslav Nikolsky
2019-08-19 14:44:16 +03:00
committed by Gavin Wood
parent 68fd94028f
commit 6fb721e861
6 changed files with 50 additions and 20 deletions
+7 -1
View File
@@ -106,7 +106,13 @@ pub trait Cache<Block: BlockT>: Send + Sync {
/// Otherwise cache may end up in inconsistent state.
fn initialize(&self, key: &well_known_cache_keys::Id, value_at_genesis: Vec<u8>) -> Result<()>;
/// Returns cached value by the given key.
fn get_at(&self, key: &well_known_cache_keys::Id, block: &BlockId<Block>) -> Option<Vec<u8>>;
///
/// Returned tuple is the range where value has been active and the value itself.
fn get_at(
&self,
key: &well_known_cache_keys::Id,
block: &BlockId<Block>,
) -> Option<((NumberFor<Block>, Block::Hash), Option<(NumberFor<Block>, Block::Hash)>, Vec<u8>)>;
}
/// Blockchain info