core code changes to implement yescrypt as relacement for qubit

This commit is contained in:
nzsquirrell
2016-06-18 20:39:19 +12:00
parent 728f6d3910
commit 03d553c81e
11 changed files with 110 additions and 27 deletions
+10 -2
View File
@@ -16,6 +16,7 @@
#include "rpcserver.h"
#include "util.h"
#include "validationinterface.h"
#include "myriad_params.h"
#ifdef ENABLE_WALLET
#include "wallet/wallet.h"
#endif
@@ -260,13 +261,20 @@ Value getmininginfo(const Array& params, bool fHelp)
obj.push_back(Pair("currentblocksize", (uint64_t)nLastBlockSize));
obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx));
obj.push_back(Pair("pow_algo_id", miningAlgo));
obj.push_back(Pair("pow_algo", GetAlgoName(miningAlgo)));
obj.push_back(Pair("pow_algo", GetAlgoName(miningAlgo, GetTime())));
obj.push_back(Pair("difficulty", (double)GetDifficulty(NULL, miningAlgo)));
obj.push_back(Pair("difficulty_sha256d", (double)GetDifficulty(NULL, ALGO_SHA256D)));
obj.push_back(Pair("difficulty_scrypt", (double)GetDifficulty(NULL, ALGO_SCRYPT)));
obj.push_back(Pair("difficulty_groestl", (double)GetDifficulty(NULL, ALGO_GROESTL)));
obj.push_back(Pair("difficulty_skein", (double)GetDifficulty(NULL, ALGO_SKEIN)));
obj.push_back(Pair("difficulty_qubit", (double)GetDifficulty(NULL, ALGO_QUBIT)));
if(GetTime() >= nTimeYescryptStart)
{
obj.push_back(Pair("difficulty_yescrypt",(double)GetDifficulty(NULL, ALGO_CPU)));
}
else
{
obj.push_back(Pair("difficulty_qubit", (double)GetDifficulty(NULL, ALGO_CPU)));
}
obj.push_back(Pair("errors", GetWarnings("statusbar")));
obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1)));
// obj.push_back(Pair("networkhashps", getnetworkhashps(params, false)));