mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
Use [u8; 4] for well known cache keys (#2152)
* Use [u8; 4] for well known cache keys * Use type alias
This commit is contained in:
committed by
DemiMarie-parity
parent
3dfda381d5
commit
fbbd79e778
@@ -21,6 +21,7 @@ use std::sync::Arc;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::Justification;
|
||||
use consensus::well_known_cache_keys;
|
||||
|
||||
use crate::error::{ErrorKind, Result};
|
||||
|
||||
@@ -100,7 +101,7 @@ pub trait ProvideCache<Block: BlockT> {
|
||||
/// Blockchain optional data cache.
|
||||
pub trait Cache<Block: BlockT>: Send + Sync {
|
||||
/// Returns cached value by the given key.
|
||||
fn get_at(&self, key: &[u8], block: &BlockId<Block>) -> Option<Vec<u8>>;
|
||||
fn get_at(&self, key: &well_known_cache_keys::Id, block: &BlockId<Block>) -> Option<Vec<u8>>;
|
||||
}
|
||||
|
||||
/// Blockchain info
|
||||
|
||||
Reference in New Issue
Block a user