X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fkernelrecord.cpp;h=3a0b2dbc9f4fff00b5ac22397f7321c9b6da757a;hb=63e4509c569f16145ab861717baf865fc6d05af1;hp=a9a2e8efda3bb7cbf6e6d8e86654e34f4bc5b093;hpb=576f3bde12e58e1b1a3c429955bcd7b92860169a;p=novacoin.git diff --git a/src/kernelrecord.cpp b/src/kernelrecord.cpp index a9a2e8e..3a0b2db 100644 --- a/src/kernelrecord.cpp +++ b/src/kernelrecord.cpp @@ -3,10 +3,6 @@ #include "wallet.h" #include "base58.h" -#ifdef _MSC_VER -#pragma warning( disable : 4345) -#endif - using namespace std; bool KernelRecord::showTransaction(const CWalletTx &wtx) @@ -47,7 +43,7 @@ vector KernelRecord::decomposeOutput(const CWallet *wallet, const CTxDestination address; std::string addrStr; - uint64_t coinAge = max( (txOut.nValue * nDayWeight) / (COIN * nOneDay), 0LL); + uint64_t coinAge = max( (txOut.nValue * nDayWeight) / (COIN * nOneDay), (int64_t)0); if (ExtractDestination(txOut.scriptPubKey, address)) { @@ -107,7 +103,7 @@ double KernelRecord::getProbToMintStake(double difficulty, int timeOffset) const //uint64_t coinAge = max(nValue * dayWeight / COIN, (int64_t)0); //return target * coinAge / pow(static_cast(2), 256); int64_t Weight = (min((GetAdjustedTime() - nTime) + timeOffset, (int64_t)(nStakeMinAge+nStakeMaxAge)) - nStakeMinAge); - uint64_t coinAge = max(nValue * Weight / (COIN * nOneDay), 0LL); + uint64_t coinAge = max(nValue * Weight / (COIN * nOneDay), (int64_t)0); return coinAge / (pow(static_cast(2),32) * difficulty); }