Skip to content

Commit

Permalink
client: ensure executed block does not get pruned if head=final FCU (#…
Browse files Browse the repository at this point in the history
…3153)

Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
  • Loading branch information
jochem-brouwer and holgerd77 committed Feb 20, 2024
1 parent c0d5fc8 commit 5fb1cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client/src/rpc/modules/engine.ts
Expand Up @@ -237,7 +237,7 @@ const pruneCachedBlocks = (chain: Chain, chainCache: ChainCache) => {
vm.header.number < finalized.header.number ? vm.header.number : finalized.header.number
for (const blockHash of executedBlocks.keys()) {
const block = executedBlocks.get(blockHash)
if (block !== undefined && block.header.number <= pruneExecutedBlocksTill) {
if (block !== undefined && block.header.number < pruneExecutedBlocksTill) {
executedBlocks.delete(blockHash)
}
}
Expand Down

0 comments on commit 5fb1cef

Please sign in to comment.