-
Notifications
You must be signed in to change notification settings - Fork 77
feat: Ledger index #1503
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
feat: Ledger index #1503
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1503 +/- ##
===========================================
+ Coverage 67.98% 68.15% +0.16%
===========================================
Files 234 236 +2
Lines 9490 9552 +62
Branches 5275 5303 +28
===========================================
+ Hits 6452 6510 +58
- Misses 1656 1657 +1
- Partials 1382 1385 +3 ☔ View full report in Codecov by Sentry. |
godexsoft
left a comment
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.
Nice. Leaving a few comments and nits 👍
godexsoft
left a comment
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.
Very cool! I'm leaving a few questions, feel free to ignore as it already works as is anyway 🚀
godexsoft
left a comment
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.
Awesome 🚀
#1052
Feature ledger_index
Return the latest closed ledger index before the given date.
Without any database change, this PR binary search from valid range.
For the full history node, the range is less than 9,000,000 now. The O(n) -> logN should be 27. Comparing with other handlers, it is acceptable.
Example input:
Example output: