mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 20:21:06 +00:00
runtime-api: do not cache None SessionInfo (#4706)
* approval-voting: add more logs * approval-voting: query finalized block on startup and increase look back * runtime-api: do not cache None SessionInfo
This commit is contained in:
@@ -317,7 +317,10 @@ impl RequestResultCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn cache_session_info(&mut self, key: SessionIndex, value: Option<SessionInfo>) {
|
pub(crate) fn cache_session_info(&mut self, key: SessionIndex, value: Option<SessionInfo>) {
|
||||||
self.session_info.insert(key, ResidentSizeOf(value));
|
// only cache Some(SessionInfo)
|
||||||
|
if value.is_some() {
|
||||||
|
self.session_info.insert(key, ResidentSizeOf(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn dmq_contents(
|
pub(crate) fn dmq_contents(
|
||||||
|
|||||||
Reference in New Issue
Block a user