mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 20:51:27 +02:00
Reset pblocktree before deleting LevelDB file
This commit is contained in:
@ -1425,6 +1425,9 @@ bool AppInitMain()
|
|||||||
pcoinsTip.reset();
|
pcoinsTip.reset();
|
||||||
pcoinsdbview.reset();
|
pcoinsdbview.reset();
|
||||||
pcoinscatcher.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));
|
pblocktree.reset(new CBlockTreeDB(nBlockTreeDBCache, false, fReset));
|
||||||
|
|
||||||
if (fReset) {
|
if (fReset) {
|
||||||
|
Reference in New Issue
Block a user