[go: up one dir, main page]

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

chore: add static file helpers on StorageWriter #9740

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

Rjected
Copy link
Member
@Rjected Rjected commented Jul 23, 2024

This adds some helper methods to write headers / transactions to static files, similar to the append_receipts_from_blocks method, in StorageWriter. This makes the log_transactions method basically a wrapper over StorageWriter methods now

@Rjected Rjected added A-db Related to the database A-static-files Related to static files labels Jul 23, 2024
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.

naming nits

first_tx_index = Some(0);
}

// TODO: I guess this error will never be returned
Copy link
Collaborator

Choose a reason for hiding this comment

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

unclear what this todo means

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

td: U256,
) -> ProviderResult<u64> {
debug!(target: "tree::persistence", ?td, ?start_tx_number, "Logging transactions");
fn log_transactions(&self, block: Arc<SealedBlock>) -> ProviderResult<u64> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I find log_ very confusing can we stick to write ?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, renamed

@Rjected Rjected requested a review from mattsse July 23, 2024 21:07
@Rjected Rjected added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit 6ce7c9e Jul 23, 2024
32 checks passed
@Rjected Rjected deleted the dan/tx-headers-helpers branch July 23, 2024 22:27
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 A-static-files Related to static files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants