Skip to content

fix: forward lookup tx in stateful tests#6883

Merged
LesnyRumcajs merged 1 commit intomainfrom
improve-stateful-tests-pending-tx
Apr 9, 2026
Merged

fix: forward lookup tx in stateful tests#6883
LesnyRumcajs merged 1 commit intomainfrom
improve-stateful-tests-pending-tx

Conversation

@LesnyRumcajs
Copy link
Copy Markdown
Member

@LesnyRumcajs LesnyRumcajs commented Apr 9, 2026

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Tests
    • Improved test logic for pending transaction filter verification by simplifying the transaction hash validation approach.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner April 9, 2026 08:37
@LesnyRumcajs LesnyRumcajs requested review from hanabi1224 and sudo-shashank and removed request for a team April 9, 2026 08:37
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4128c217-8cba-41aa-a026-1f92a50f8364

📥 Commits

Reviewing files that changed from the base of the PR and between cb7a74a and a48f6a4.

📒 Files selected for processing (1)
  • src/tool/subcommands/api_cmd/stateful_tests.rs

Walkthrough

The test eth_new_pending_transaction_filter has been refactored to obtain the transaction hash directly via the EthGetTransactionHashByCid RPC call instead of iterating over all pending filter hashes and reverse-mapping them. The assertion and failure message have been updated accordingly.

Changes

Cohort / File(s) Summary
Test Logic Update
src/tool/subcommands/api_cmd/stateful_tests.rs
Replaced hash-to-CID reverse-mapping approach with direct CID-to-hash conversion via EthGetTransactionHashByCid. Updated assertion to verify transaction hash presence and modified failure message. Added EthGetTransactionHashByCid to test's used_methods.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Possibly related PRs

Suggested labels

RPC

Suggested reviewers

  • sudo-shashank
  • hanabi1224
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: forward lookup tx in stateful tests' directly corresponds to the main change: replacing reverse transaction lookups with forward lookups using EthGetTransactionHashByCid instead of iterating and reverse-mapping with EthGetMessageCidByTransactionHash.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-stateful-tests-pending-tx
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch improve-stateful-tests-pending-tx

Comment @coderabbitai help to get the list of available commands and usage tips.

@LesnyRumcajs LesnyRumcajs enabled auto-merge April 9, 2026 08:58
@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit a59e935 Apr 9, 2026
46 checks passed
@LesnyRumcajs LesnyRumcajs deleted the improve-stateful-tests-pending-tx branch April 9, 2026 09:23
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