X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fkernel.cpp;h=71a14e3cbd2f9a69224ac318df9ebdddcc3ea3b5;hp=ef08a865796551dcb9b752818081c98dfc558d08;hb=0c0eb55c15b7cc09e8f422f1e2e54fe569f06c2e;hpb=319f8e98bd523065946530c3cbdaa1c993642c48 diff --git a/src/kernel.cpp b/src/kernel.cpp index ef08a86..71a14e3 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -280,6 +280,7 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned int64 nValueIn = txPrev.vout[prevout.n].nValue; int64 nTimeWeight; + uint256 hashBlockFrom = blockFrom.GetHash(); // Kernel hash weight starts from 0 at the 30-day min age // this change increases active coins participating the hash and helps @@ -305,7 +306,7 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned int nStakeModifierHeight = 0; int64 nStakeModifierTime = 0; - if (!GetKernelStakeModifier(blockFrom.GetHash(), nStakeModifier, nStakeModifierHeight, nStakeModifierTime, fPrintProofOfStake)) + if (!GetKernelStakeModifier(hashBlockFrom, nStakeModifier, nStakeModifierHeight, nStakeModifierTime, fPrintProofOfStake)) return false; ss << nStakeModifier; @@ -316,7 +317,7 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned printf("CheckStakeKernelHash() : using modifier 0x%016"PRI64x" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", nStakeModifier, nStakeModifierHeight, DateTimeStrFormat(nStakeModifierTime).c_str(), - mapBlockIndex[blockFrom.GetHash()]->nHeight, + mapBlockIndex[hashBlockFrom]->nHeight, DateTimeStrFormat(blockFrom.GetBlockTime()).c_str()); printf("CheckStakeKernelHash() : check protocol=%s modifier=0x%016"PRI64x" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n", "0.3", @@ -333,7 +334,7 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned printf("CheckStakeKernelHash() : using modifier 0x%016"PRI64x" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", nStakeModifier, nStakeModifierHeight, DateTimeStrFormat(nStakeModifierTime).c_str(), - mapBlockIndex[blockFrom.GetHash()]->nHeight, + mapBlockIndex[hashBlockFrom]->nHeight, DateTimeStrFormat(blockFrom.GetBlockTime()).c_str()); printf("CheckStakeKernelHash() : pass protocol=%s modifier=0x%016"PRI64x" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n", "0.3",