diff --git a/substrate/primitives/blockchain/src/header_metadata.rs b/substrate/primitives/blockchain/src/header_metadata.rs index c2054445b067..c83625d606c1 100644 --- a/substrate/primitives/blockchain/src/header_metadata.rs +++ b/substrate/primitives/blockchain/src/header_metadata.rs @@ -284,7 +284,7 @@ impl Default for HeaderMetadataCache { impl HeaderMetadataCache { pub fn header_metadata(&self, hash: Block::Hash) -> Option> { - self.cache.write().get(&hash).cloned() + self.cache.read().peek(&hash).cloned() } pub fn insert_header_metadata(&self, hash: Block::Hash, metadata: CachedHeaderMetadata) {