diff --git a/src/init.cpp b/src/init.cpp index 1884e6dac..80304bf2c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -610,6 +610,17 @@ static void ZC_LoadParams() boost::filesystem::path pk_path = ZC_GetParamsDir() / "sprout-proving.key"; boost::filesystem::path vk_path = ZC_GetParamsDir() / "sprout-verifying.key"; + if (!(boost::filesystem::exists(pk_path) && boost::filesystem::exists(vk_path))) { + uiInterface.ThreadSafeMessageBox(strprintf( + _("Cannot find the Zcash network parameters in the following directory:\n" + "%s\n" + "Please run 'zcash-fetch-params' or './zcutil/fetch-params.sh' and then restart."), + ZC_GetParamsDir()), + "", CClientUIInterface::MSG_ERROR); + StartShutdown(); + return; + } + pzcashParams = ZCJoinSplit::Unopened(); LogPrintf("Loading verifying key from %s\n", vk_path.string().c_str());