Skip to content

change of by one to cleanup_race_cache#20830

Open
wjblanke wants to merge 1 commit intomainfrom
backfork2wjb
Open

change of by one to cleanup_race_cache#20830
wjblanke wants to merge 1 commit intomainfrom
backfork2wjb

Conversation

@wjblanke
Copy link
Copy Markdown
Contributor

@wjblanke wjblanke commented Apr 22, 2026

DO NOT MERGE

Purpose:

Current Behavior:

New Behavior:

Testing Notes:


Note

Medium Risk
Touches untrusted wallet short-sync cache eviction logic; an off-by-one here can affect whether coin states are re-applied or dropped around reorg boundaries.

Overview
Fixes an off-by-one in untrusted close-to-peak syncing by changing cleanup_race_cache() to retain entries starting at backtrack_fork_height + 1 after applying per-height race-cache updates, instead of including the fork height itself.

Reviewed by Cursor Bugbot for commit 2b16846. Bugbot is set up for automated code reviews on this repo. Configure here.

@wjblanke wjblanke requested a review from a team as a code owner April 22, 2026 23:43
@wjblanke wjblanke added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Apr 22, 2026
@coveralls-official
Copy link
Copy Markdown

Coverage Report for CI Build 24808455717

Coverage decreased (-0.04%) to 91.188%

Details

  • Coverage decreased (-0.04%) from the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • 63 coverage regressions across 25 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

63 previously-covered lines in 25 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
chia/wallet/wallet_node.py 11 86.35%
chia/daemon/server.py 7 80.62%
chia/full_node/full_node.py 6 87.37%
chia/_tests/core/server/test_event_loop.py 6 89.04%
chia/simulator/setup_services.py 3 96.3%
chia/_tests/core/util/test_lockfile.py 3 89.86%
chia/timelord/timelord.py 3 72.76%
chia/data_layer/data_layer.py 2 85.68%
chia/data_layer/data_store.py 2 95.55%
chia/util/db_wrapper.py 2 96.58%

Coverage Stats

Coverage Status
Relevant Lines: 117497
Covered Lines: 107305
Line Coverage: 91.33%
Relevant Branches: 11720
Covered Branches: 10525
Branch Coverage: 89.8%
Branches in Coverage %: Yes
Coverage Strength: 1.83 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant