-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHARD-2024: Fix incorrect transaction index #139
Conversation
PR Reviewer Guide 🔍(Review updated until commit 26a7124)Here are some key observations to aid the review process:
|
Persistent review updated to latest commit 26a7124 |
Can we investigate why it has |
its hard coded in like 8 places in shardeum server. Not sure what the downstream changes frmo that point on would be |
Did anyone actually check to see if its returning proper TX indexes now? I can't see how this would fix the problem. |
ETH Handlers TestingSummary of work done
Test Coverage
Issues FoundTwo main issues were identified and documented as tickets:
Test ScenariosThe tests cover all major code paths and edge cases:
Next Steps
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the anys from the function prototypes in BuildGetTransactionByBlockHashAndIndex and BuildGetTransactionByBlockNumberAndIndex
let result: string | completeReadableReceipt | null | undefined = null | ||
|
||
try { | ||
const blockResp = await collectorAPI.getBlock((args as any)[0], 'hash', true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this work without any?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question for all the as any
below
User description
Correct the incorrect transactionIndex output for
eth_getTransactionByBlockHashAndIndex
andeth_getTransactionByBlockNumberAndIndex
.PR Type
Bug fix
Description
Fix incorrect transaction index in API responses.
Add undefined check for transaction index.
Changes walkthrough 📝
api.ts
Correct transaction index and add undefined check
src/api.ts