Reset pblocktree before deleting LevelDB file
This commit is contained in:
parent
89005ddad1
commit
a8b5d20f4f
1 changed files with 3 additions and 0 deletions
|
@ -1425,6 +1425,9 @@ bool AppInitMain()
|
|||
pcoinsTip.reset();
|
||||
pcoinsdbview.reset();
|
||||
pcoinscatcher.reset();
|
||||
// new CBlockTreeDB tries to delete the existing file, which
|
||||
// fails if it's still open from the previous loop. Close it first:
|
||||
pblocktree.reset();
|
||||
pblocktree.reset(new CBlockTreeDB(nBlockTreeDBCache, false, fReset));
|
||||
|
||||
if (fReset) {
|
||||
|
|
Loading…
Reference in a new issue