Skip to content

fix: fix freeze header-number shadowing for block prune#3653

Merged
flywukong merged 4 commits into
bnb-chain:developfrom
flywukong:fix-db-freezer
Apr 22, 2026
Merged

fix: fix freeze header-number shadowing for block prune#3653
flywukong merged 4 commits into
bnb-chain:developfrom
flywukong:fix-db-freezer

Conversation

@flywukong

@flywukong flywukong commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Description

related to #3642

1) Avoid variable shadowing in chain freezer freeze() by replacing := with assignment to the outer number variable. This ensures tryPruneHistoryBlock receives the actual head number instead of zero and restores ancient tail pruning when BlockHistory/PruneAncientData is enabled.
2) remove dead code

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@allformless allformless added this to the 1.7.3 milestone Apr 21, 2026
@flywukong flywukong merged commit 6849818 into bnb-chain:develop Apr 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants