diff --git a/src/clientversion.h b/src/clientversion.h index 13c1c166..806aced0 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -9,7 +9,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 99 -#define CLIENT_VERSION_BUILD 7 +#define CLIENT_VERSION_BUILD 8 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true diff --git a/src/main.cpp b/src/main.cpp index 7f7f9800..45658708 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2089,10 +2089,11 @@ bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew) nBestChainWork = pindexNew->nChainWork; nTimeBestReceived = GetTime(); nTransactionsUpdated++; - printf("SetBestChain: new best=%s height=%d pow_algo=%d log2_work=%.8g tx=%lu date=%s progress=%f\n", + printf("SetBestChain: new best=%s height=%d pow_algo=%d block_work=%s log2_work=%.8g tx=%lu date=%s progress=%f\n", hashBestChain.ToString().c_str(), nBestHeight, pindexNew->GetAlgo(), + pindexNew->GetBlockWorkAdjusted().ToString().c_str(), log(nBestChainWork.getdouble())/log(2.0), (unsigned long)pindexNew->nChainTx, DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexBest->GetBlockTime()).c_str(), diff --git a/src/main.h b/src/main.h index 9fea5393..3d85cf66 100644 --- a/src/main.h +++ b/src/main.h @@ -687,7 +687,7 @@ enum BlockStatus { BLOCK_FAILED_MASK = 96 }; -const int64 nBlockAlgoWeightStart = 1000000; +const int64 nBlockAlgoWorkWeightStart = 142000; // block where algo work weighting starts /** The block chain is a tree shaped structure starting with the * genesis block at the root, with each block potentially having multiple @@ -830,7 +830,11 @@ public: int GetAlgoWorkFactor() const { - if (nHeight < nBlockAlgoWeightStart) + if (!TestNet() && (nHeight < nBlockAlgoWorkWeightStart)) + { + return 1; + } + if (TestNet() && (nHeight < 100)) { return 1; } @@ -838,14 +842,15 @@ public: { case ALGO_SHA256D: return 1; + // work factor = absolute work ratio * optimisation factor case ALGO_SCRYPT: - return 1; + return 1024 * 4; case ALGO_GROESTL: - return 1; + return 64 * 8; case ALGO_SKEIN: - return 1; + return 4 * 6; case ALGO_QUBIT: - return 1; + return 128 * 8; default: return 1; } diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index bd7bc0ba..c437bd7c 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -201,4 +201,3 @@ Value getaddednodeinfo(const Array& params, bool fHelp) return ret; } -