mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
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:
committed by
Gavin Wood
parent
68fd94028f
commit
6fb721e861
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user