Auto merge of #1979 - str4d:1786-inform-users-to-fetch-params, r=bitcartel

Instruct users to run zcash-fetch-params if network params aren't available

Closes #1786.
This commit is contained in:
zkbot 2017-01-19 21:47:26 +00:00
commit c2c7998c2e
1 changed files with 11 additions and 0 deletions

View File

@ -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());