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

Move CHistoryWriter into CCustomCSView #1700

Merged
merged 8 commits into from
Feb 6, 2023
Merged

Conversation

Bushstar
Copy link
Member

@Bushstar Bushstar commented Jan 18, 2023

CHistoryWriter should be created outside of any call to ConnectBlock or DisconnectBlock. This allows us to sometimes not pass in a history writer at all to avoid writing changes. For example, when starting the node VerifyDB is run which disconnects blocks. The changes made by VerifyDB when disconnecting blocks should be discarded, but for our bespoke DBs pburnHistoryDB, paccountHistoryDB and pvaultHistoryDB this did not happen which resulted in entries being removed from those DBs when new blocks were connected and the DBs were flushed.

This PR resolves that issue and is a step towards making all history writer DBs an integrated part of CCusttomCSView with layered flushing which will help simplify use and code further.

Jouzo
Jouzo previously approved these changes Jan 18, 2023
@Bushstar Bushstar removed the ci/sync label Jan 31, 2023
@Bushstar Bushstar changed the title Discard bespoke DBs on VerifyDB Move CHistoryWriter into CCustomCSView Jan 31, 2023
@prasannavl prasannavl mentioned this pull request Feb 9, 2023
19 tasks
@Mixa84 Mixa84 added v/3.2.4 and removed v/3.2.3 labels Feb 3, 2023
@prasannavl prasannavl merged commit a8d147f into master Feb 6, 2023
@prasannavl prasannavl deleted the discard-on-verifydb branch February 6, 2023 05:50
@prasannavl prasannavl mentioned this pull request Feb 24, 2023
25 tasks
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.

4 participants