mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-23 12:16:25 +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:
1 parent
d4ff5699f0
commit
5e308e3fee
1 file changed
+4
-1
@@ -317,7 +317,10 @@ impl RequestResultCache {
|
||||
}
|
||||
|
||||
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(
|
||||
|
||||
Reference in new issue
Block a user