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

feat: add get_in_memory_or_storage_by_tx_range #11414

Merged
merged 8 commits into from
Oct 2, 2024
Merged

feat: add get_in_memory_or_storage_by_tx_range #11414

merged 8 commits into from
Oct 2, 2024

Conversation

joshieDo
Copy link
Collaborator

@joshieDo joshieDo commented Oct 2, 2024

Our _by_tx_range were only looking into persistent storage and not memory. closes #10182

  • adds get_in_memory_or_storage_by_tx_range

@joshieDo joshieDo added C-enhancement New feature or request A-db Related to the database labels Oct 2, 2024
@joshieDo joshieDo marked this pull request as ready for review October 2, 2024 11:35
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is pretty cursed but I believe all these checks are correct, the docs are very helpful

let provider = self.database.provider()?;

// Get the last block number stored in the storage which does NOT overlap with in-memory
// chain.
Copy link
Collaborator

Choose a reason for hiding this comment

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

in other words, this ensures that the chain on disk and memory don't overlap but are contiguous

@mattsse mattsse enabled auto-merge October 2, 2024 17:35
@mattsse mattsse added this pull request to the merge queue Oct 2, 2024
Merged via the queue into main with commit 5ec448e Oct 2, 2024
35 checks passed
@mattsse mattsse deleted the joshie/txrange branch October 2, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make BlockchainProvider2 receipt methods aware of in-memory state
3 participants