Upgrade from per-tx database to per-txout

This commit is contained in:
Pieter Wuille
2017-04-25 11:29:46 -07:00
parent b2af357f39
commit 8b25d2c0ce
4 changed files with 54 additions and 0 deletions

View File

@@ -1455,6 +1455,12 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
//If we're reindexing in prune mode, wipe away unusable block files and all undo data files
if (fPruneMode)
CleanupBlockRevFiles();
} else {
// If necessary, upgrade from older database format.
if (!pcoinsdbview->Upgrade()) {
strLoadError = _("Error upgrading chainstate database");
break;
}
}
if (!LoadBlockIndex(chainparams)) {