Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,201 Lines • ▼ Show 20 Lines | while (!fLoaded && !fRequestShutdown) { | ||||
// or -reindex-chainstate | // or -reindex-chainstate | ||||
if (!pcoinsdbview->Upgrade()) { | if (!pcoinsdbview->Upgrade()) { | ||||
strLoadError = _("Error upgrading chainstate database"); | strLoadError = _("Error upgrading chainstate database"); | ||||
break; | break; | ||||
} | } | ||||
// ReplayBlocks is a no-op if we cleared the coinsviewdb with | // ReplayBlocks is a no-op if we cleared the coinsviewdb with | ||||
// -reindex or -reindex-chainstate | // -reindex or -reindex-chainstate | ||||
if (!ReplayBlocks(config, pcoinsdbview.get())) { | if (!ReplayBlocks(chainparams.GetConsensus(), | ||||
pcoinsdbview.get())) { | |||||
strLoadError = | strLoadError = | ||||
_("Unable to replay blocks. You will need to rebuild " | _("Unable to replay blocks. You will need to rebuild " | ||||
"the database using -reindex-chainstate."); | "the database using -reindex-chainstate."); | ||||
break; | break; | ||||
} | } | ||||
// The on-disk coinsdb is now in a good state, create the cache | // The on-disk coinsdb is now in a good state, create the cache | ||||
pcoinsTip.reset(new CCoinsViewCache(pcoinscatcher.get())); | pcoinsTip.reset(new CCoinsViewCache(pcoinscatcher.get())); | ||||
▲ Show 20 Lines • Show All 277 Lines • Show Last 20 Lines |