Skip to content

Conversation

@freemans13
Copy link
Collaborator

Don't shadow I variable in nested for loop
Also tweaked logging to log WARN on ordering problems

… Also tweaked logging to log WARN on ordering problems
@freemans13 freemans13 self-assigned this Nov 18, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

🤖 Claude Code Review

Status: Complete


Summary:
This PR fixes a variable shadowing bug in filterTransactionsWithValidParents and adds a new configuration option to control transaction filtering behavior. The changes are solid with comprehensive test coverage.

Key Changes:

  1. Bug Fix (Line 1880): Fixed variable shadowing where loop variable i was being reused, causing incorrect currentIdx calculations in ordering validation. Changed to parentIdx for clarity.
  2. Logging Improvements: Upgraded several debug logs to warnings for better visibility of data inconsistencies and invalid parent scenarios.
  3. New Setting: Added blockassembly_filterTransactionsWithInvalidParents (default: false) to control whether transactions with invalid parents are excluded from blocks.
  4. Test Coverage: Added two comprehensive test files with 936 lines covering the bug fix and reorg scenarios.

No issues found. The implementation follows project conventions and includes appropriate defensive checks.

@freemans13 freemans13 requested a review from liam November 25, 2025 12:24
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.

1 participant