diff options
| author | Sjors Provoost <[email protected]> | 2018-02-11 12:14:08 +0100 |
|---|---|---|
| committer | Sjors Provoost <[email protected]> | 2018-02-11 12:14:08 +0100 |
| commit | a8b5d20f4f171828b2bd70ab2405c42b1e452e5b (patch) | |
| tree | beff8292730edb510c67d192770cd909b507242c /src/init.cpp | |
| parent | Merge #11761: [docs] initial QT documentation (diff) | |
| download | discoin-a8b5d20f4f171828b2bd70ab2405c42b1e452e5b.tar.xz discoin-a8b5d20f4f171828b2bd70ab2405c42b1e452e5b.zip | |
Reset pblocktree before deleting LevelDB file
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 84398d978..4ff875f9a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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) { |