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

Flush witness data properly #129

Open
leto opened this issue Jul 31, 2020 · 1 comment
Open

Flush witness data properly #129

leto opened this issue Jul 31, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@leto
Copy link
Member

leto commented Jul 31, 2020

Flush witness data to disk only when it’s consistent

This fix prevents the wallet database from getting into an inconsistent state. By flushing witness data to disk from the wallet thread, instead of the main thread, we ensure that the on-disk block height is always the same as the witness data height. Previously, the database occasionally got into a state where the latest block height was one ahead of the witness data. This then triggered an assertion failure in CWallet::IncrementNoteWitnesses() upon restarting after a zcashd shutdown.

Note that this code change will not automatically repair a data directory that has been affected by this problem; that requires starting zcashd with the -rescan or -reindex options.

from ZEC 3.1.0 release notes

@leto
Copy link
Member Author

leto commented Sep 5, 2020

Not sure if this code was ported or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant