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

Start indexing at the appropriate block #3956

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Conversation

partialord
Copy link
Contributor

When using --index-sats or --index-addresses, we need to index all blocks, but --index-inscriptions only needs blocks starting from 767430, and --index-runes can start at 840000. The existing code for this is tricky and also wrong -- it incorrectly skips early blocks when using --index-addresses but not --index-sats, and it unnecessarily processes blocks from 767430 to 840000 when using --index-runes but not --index-inscriptions.

Replace the old code with a single, correct calculation of which block to start at. This speeds up building a runes-only index by about 4x.

@casey casey merged commit 51d84da into ordinals:master Sep 20, 2024
5 checks passed
@casey
Copy link
Collaborator

casey commented Sep 20, 2024

LGTM!

@partialord partialord deleted the start-block branch September 20, 2024 09:12
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.

2 participants