mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Full path in "failed to load cache" warnings (#1411)
This commit is contained in:
parent
ff30aed68f
commit
5758ae1bfc
23
src/init.cpp
23
src/init.cpp
@ -1870,33 +1870,40 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
// LOAD SERIALIZED DAT FILES INTO DATA CACHES FOR INTERNAL USE
|
||||
|
||||
boost::filesystem::path pathDB = GetDataDir();
|
||||
std::string strDBName;
|
||||
|
||||
strDBName = "mncache.dat";
|
||||
uiInterface.InitMessage(_("Loading masternode cache..."));
|
||||
CFlatDB<CMasternodeMan> flatdb1("mncache.dat", "magicMasternodeCache");
|
||||
CFlatDB<CMasternodeMan> flatdb1(strDBName, "magicMasternodeCache");
|
||||
if(!flatdb1.Load(mnodeman)) {
|
||||
return InitError("Failed to load masternode cache from mncache.dat");
|
||||
return InitError(_("Failed to load masternode cache from") + "\n" + (pathDB / strDBName).string());
|
||||
}
|
||||
|
||||
if(mnodeman.size()) {
|
||||
strDBName = "mnpayments.dat";
|
||||
uiInterface.InitMessage(_("Loading masternode payment cache..."));
|
||||
CFlatDB<CMasternodePayments> flatdb2("mnpayments.dat", "magicMasternodePaymentsCache");
|
||||
CFlatDB<CMasternodePayments> flatdb2(strDBName, "magicMasternodePaymentsCache");
|
||||
if(!flatdb2.Load(mnpayments)) {
|
||||
return InitError("Failed to load masternode payments cache from mnpayments.dat");
|
||||
return InitError(_("Failed to load masternode payments cache from") + "\n" + (pathDB / strDBName).string());
|
||||
}
|
||||
|
||||
strDBName = "governance.dat";
|
||||
uiInterface.InitMessage(_("Loading governance cache..."));
|
||||
CFlatDB<CGovernanceManager> flatdb3("governance.dat", "magicGovernanceCache");
|
||||
CFlatDB<CGovernanceManager> flatdb3(strDBName, "magicGovernanceCache");
|
||||
if(!flatdb3.Load(governance)) {
|
||||
return InitError("Failed to load governance cache from governance.dat");
|
||||
return InitError(_("Failed to load governance cache from") + "\n" + (pathDB / strDBName).string());
|
||||
}
|
||||
governance.InitOnLoad();
|
||||
} else {
|
||||
uiInterface.InitMessage(_("Masternode cache is empty, skipping payments and governance cache..."));
|
||||
}
|
||||
|
||||
strDBName = "netfulfilled.dat";
|
||||
uiInterface.InitMessage(_("Loading fulfilled requests cache..."));
|
||||
CFlatDB<CNetFulfilledRequestManager> flatdb4("netfulfilled.dat", "magicFulfilledCache");
|
||||
CFlatDB<CNetFulfilledRequestManager> flatdb4(strDBName, "magicFulfilledCache");
|
||||
if(!flatdb4.Load(netfulfilledman)) {
|
||||
return InitError("Failed to load fulfilled requests cache from netfulfilled.dat");
|
||||
return InitError(_("Failed to load fulfilled requests cache from") + "\n" + (pathDB / strDBName).string());
|
||||
}
|
||||
|
||||
// ********************************************************* Step 11c: update block tip in Dash modules
|
||||
|
Loading…
Reference in New Issue
Block a user