diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-04-25 11:29:46 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-01 13:15:24 -0700 |
commit | 8b25d2c0ce64d7f8577a0c2e601e505c9f1140bf (patch) | |
tree | f0e2511a6e0aebf0012c209f54574b649651d3b2 /src/init.cpp | |
parent | b2af357f39c7d17ab6ddb2938531155bf90126ec (diff) |
Upgrade from per-tx database to per-txout
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 4420b6f658..8ce3847955 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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)) { |