Skip to content
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

fix: locate log within receipt using logIndex #25

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

bendanzhentan
Copy link
Contributor

Log.LogIndex is indexed at the block level, so it’s incorrect to locate a log using receipt.Logs[log.LogIndex].

Instead, we should traverse through receipt.Logs and find the matching log based on log.LogIndex.

@bendanzhentan bendanzhentan changed the base branch from main to avoid-reprocessing-withdrawals December 14, 2023 04:55
Copy link

@welkin22 welkin22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from avoid-reprocessing-withdrawals to develop January 4, 2024 03:02
Log.LogIndex is indexed at the block level, so it's incorrect to locate a log
using receipt.Logs[log.LogIndex].
Instead, we should traverse through receipt.Logs and find the matching log based
on log.LogIndex.
@bendanzhentan bendanzhentan merged commit 97976e2 into develop Jan 4, 2024
2 checks passed
@bendanzhentan bendanzhentan deleted the fix-log-index branch January 4, 2024 03:11
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