fix(exex): update lowest_committed_block_height in WAL cache on insert (#20548)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
strmfos
2025-12-23 11:58:03 +01:00
committed by GitHub
parent 66db0839a0
commit ff2081dcf0

View File

@@ -116,6 +116,11 @@ impl BlockCache {
self.committed_blocks.insert(block.hash(), (file_id, cached_block));
}
let first_block_number = committed_chain.first().number();
self.lowest_committed_block_height = Some(
self.lowest_committed_block_height
.map_or(first_block_number, |lowest| lowest.min(first_block_number)),
);
self.highest_committed_block_height = Some(committed_chain.tip().number());
}
}