8000 Refactor prune file replace by antiochp · Pull Request #3571 · mimblewimble/grin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor prune file replace #3571

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

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

antiochp
Copy link
Member

This is a smaller refactor based on #3568.
We now write the tmp hash file and the tmp data file during chain compaction and then replace both underlying files with the tmp files.
Writing the tmp files does not require &mut self and this mut reference is only necessary in the final replace step.
Writing the tmp files can now be done with a simple &self reference which makes the code more flexible.

Still testing these changes but as far as I can tell this does not reintroduce the issue in #3568 (reverted in #3569).

@antiochp antiochp merged commit 9c44a4d into mimblewimble:master Feb 23, 2021
@antiochp antiochp deleted the prune_refactor_file_replace branch February 23, 2021 11:40
@antiochp antiochp mentioned this pull request May 6, 2021
bayk added a commit to mwcproject/mwc-node that referenced this pull request Jun 12, 2024
* split prune file rewrite into two steps only one needs a mut ref to self
* write both tmp files then replace
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.

1 participant
0