Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Fix database rebuild functionality #5826

Merged
merged 3 commits into from
Nov 15, 2019
Merged

Fix database rebuild functionality #5826

merged 3 commits into from
Nov 15, 2019

Conversation

halfalicious
Copy link
Contributor

Fix #5823

One can now initiate a rebuild via -R and have it complete successfully, whereas prior to these changes it would fail with a database corruption error. The problem was that importing the first block would fail because it required the genesis block details, which weren't re-inserted into the m_details cache after it was cleared in preparation for rebuild.

Copy link
Member

@gumb0 gumb0 left a comment

Choose a reason for hiding this comment

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

Looks good to me, needs rebase

One can now initiate a rebuild via -R and have it complete successfully,
whereas prior to these changes it would fail with a database corruption
error.
Also insert the genesis block details into the extras database during
rebuild since the genesis block won't be reimported during the rebuild
process.
@codecov-io
Copy link

Codecov Report

Merging #5826 into master will decrease coverage by 0.01%.
The diff coverage is 2.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5826      +/-   ##
==========================================
- Coverage   64.09%   64.08%   -0.02%     
==========================================
  Files         360      360              
  Lines       30876    30893      +17     
  Branches     3428     3426       -2     
==========================================
+ Hits        19791    19798       +7     
- Misses       9854     9865      +11     
+ Partials     1231     1230       -1

@halfalicious halfalicious merged commit dba2a7e into master Nov 15, 2019
@halfalicious halfalicious deleted the fix-rebuild branch November 15, 2019 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
database Database-related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aleth's rebuild functionality (-R) triggers database corruption error
3 participants