OffloadingConnector: Prevent redundant loads (#29087)

Signed-off-by: Or Ozeri <oro@il.ibm.com>
This commit is contained in:
Or Ozeri
2026-01-21 01:15:42 +00:00
committed by GitHub
parent c78ee240b3
commit 7013e9ac8f
5 changed files with 109 additions and 8 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class LRUOffloadingManager(OffloadingManager):
self.blocks: OrderedDict[BlockHash, BlockStatus] = OrderedDict()
self.events: list[OffloadingEvent] | None = [] if enable_events else None
def lookup(self, block_hashes: Iterable[BlockHash]) -> int:
def lookup(self, block_hashes: Iterable[BlockHash]) -> int | None:
hit_count = 0
for block_hash in block_hashes:
block = self.blocks.get(block_hash)