Ignore payments and governance cache when mncache is empty (#1227)

This commit is contained in:
UdjinM6 2016-12-26 19:33:28 +04:00 committed by GitHub
parent cda28d3c72
commit 32d5f4b013

View File

@ -1874,6 +1874,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
return InitError("Failed to load masternode cache from mncache.dat");
}
if(mnodeman.size()) {
uiInterface.InitMessage(_("Loading masternode payment cache..."));
CFlatDB<CMasternodePayments> flatdb2("mnpayments.dat", "magicMasternodePaymentsCache");
if(!flatdb2.Load(mnpayments)) {
@ -1886,6 +1887,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
return InitError("Failed to load governance cache from governance.dat");
}
governance.InitOnLoad();
} else {
uiInterface.InitMessage(_("Masternode cache is empty, skipping payments and governance cache..."));
}
uiInterface.InitMessage(_("Loading fullfiled requests cache..."));
CFlatDB<CNetFulfilledRequestManager> flatdb4("netfulfilled.dat", "magicFulfilledCache");