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:
Andronik authored and GitHub committed 2022-01-13 08:15:59 +00:00
1 parent d4ff5699f0
commit 5e308e3fee
1 file changed
+4 -1
+4 -1
View File
@@ -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(