-
Notifications
You must be signed in to change notification settings - Fork 20
Do not skip storing messages in indexer #621
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
Conversation
WalkthroughThe changes introduce a new boolean variable Changes
Sequence Diagram(s)sequenceDiagram
participant I as IndexLogs
participant BC as Blockchain
participant L as Log Storage
I->>BC: Query block number
alt Query successful
BC-->>I: Return block number
I->>I: Evaluate reorg condition and handle if needed
else Query fails
BC-->>I: Return error
I->>I: Set skipReorgHandling to true
end
I->>L: Proceed with log storage
Possibly related PRs
Suggested labels
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)Error: can't load config: the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24) 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -286,50 +286,54 @@ func indexLogs( | |||
// - There's a stored block | |||
// - The event block number is greater than the stored block number | |||
// - The check interval has passed | |||
skipReorgHandling := false | |||
if !reorgInProgress && |
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.
I have never managed to truly convince myself that this if
statement is correct. I just glaze over it and say "this is too complicated for me to dig into". Not the best approach, I know. Adding another layer of if statements makes this virtually impossible to reason about. I am hoping that someone other than Borja knows what this does :)
Summary by CodeRabbit