diff --git a/src/init.cpp b/src/init.cpp index 21c1e854b..fa8037c34 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1874,18 +1874,22 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) return InitError("Failed to load masternode cache from mncache.dat"); } - uiInterface.InitMessage(_("Loading masternode payment cache...")); - CFlatDB flatdb2("mnpayments.dat", "magicMasternodePaymentsCache"); - if(!flatdb2.Load(mnpayments)) { - return InitError("Failed to load masternode payments cache from mnpayments.dat"); - } + if(mnodeman.size()) { + uiInterface.InitMessage(_("Loading masternode payment cache...")); + CFlatDB flatdb2("mnpayments.dat", "magicMasternodePaymentsCache"); + if(!flatdb2.Load(mnpayments)) { + return InitError("Failed to load masternode payments cache from mnpayments.dat"); + } - uiInterface.InitMessage(_("Loading governance cache...")); - CFlatDB flatdb3("governance.dat", "magicGovernanceCache"); - if(!flatdb3.Load(governance)) { - return InitError("Failed to load governance cache from governance.dat"); + uiInterface.InitMessage(_("Loading governance cache...")); + CFlatDB flatdb3("governance.dat", "magicGovernanceCache"); + if(!flatdb3.Load(governance)) { + return InitError("Failed to load governance cache from governance.dat"); + } + governance.InitOnLoad(); + } else { + uiInterface.InitMessage(_("Masternode cache is empty, skipping payments and governance cache...")); } - governance.InitOnLoad(); uiInterface.InitMessage(_("Loading fullfiled requests cache...")); CFlatDB flatdb4("netfulfilled.dat", "magicFulfilledCache");