Skip to content

rpc/jsonrpc: trim the over-engineering left by #23690 - #23725

Merged
AskAlexSharov merged 1 commit into
mainfrom
lupin012/prune_gates_over_engineering
Sep 2, 2026
Merged

rpc/jsonrpc: trim the over-engineering left by #23690#23725
AskAlexSharov merged 1 commit into
mainfrom
lupin012/prune_gates_over_engineering

Conversation

@lupin012

@lupin012 lupin012 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #23690, from an over-engineering review pass on it. No behavior change.

Site Change
eth_api.go, eth_system.go receiptsRetiredWithHistory inlined as !amount.Enabled() — both call sites are the second arm of a switch whose first arm already handles KeepAllReceiptsPruneMode
check_prune_gates_test.go, prune_gating_test.go TestCapabilitiesFollowHistoryForASentinelRetention → a pruneGatingConfigs row; TestCapabilitiesAgreeWithGates pins it against the gate more tightly
receipts/ the two new test files → one test next to the helpers it uses, pinning the pre-semaphore answer and the cache together
check_prune_gates_test.go the resolveLogsRange leg dropped — nothing reaches the resolver except the two legs above it
eth_api.go, erigon_receipts_test.go three docstrings trimmed to what the name does not carry

Net −110 lines. No new test: pure inlining and test consolidation, covered by the existing suite.

Six sites from an over-engineering review pass on #23690.

- receiptsRetiredWithHistory is inlined as `!amount.Enabled()`: both call
  sites are the second arm of a switch whose first arm already handles
  KeepAllReceiptsPruneMode, and both hold `amount` in scope.
- TestCapabilitiesFollowHistoryForASentinelRetention becomes a
  pruneGatingConfigs row, which TestCapabilitiesAgreeWithGates pins
  against the gate more tightly than the deleted test did.
- The two new receipts test files become one test next to the helpers
  they use, pinning the pre-semaphore answer and the cache together.
- The resolveLogsRange leg, and three docstrings that restate their name
  or belong in a commit message, are dropped.

No behavior change, so no new test: the existing suite covers it.
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit 6101021 Sep 2, 2026
139 checks passed
@AskAlexSharov
AskAlexSharov deleted the lupin012/prune_gates_over_engineering branch September 2, 2026 09:03
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.

2 participants