fix: Indexing a fresh local chain from block 0 caused an integer underflow due to left-to-right evaluation.#78
Conversation
…rflow due to left-to-right evaluation.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe batch completion logging statement reorders the arithmetic expression for calculating ChangesBatch Completion Logging Expression
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
I was trying to test the indexer using a local chain on anvil. I ran into the following error:
Steps to reproduce:
docker compose down -vdocker compose up -d postgresanvil --host 127.0.0.1 --port 8545 --block-time 2 --chain-id 31337 --accounts 10 --balance 10000just backend-runThis would always throw the underflow error the first time I run. On running
just backend-runa second time, it seems to start working as expected.On the first run it looks like
end_blockis always equal tobatch_size - 1causing an underflow due to it being subtracted before the+ 1Summary by CodeRabbit