From 5650734a7e69295f3b8cb9607bd4664033572c3b Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 23 Mar 2017 16:06:36 -0400 Subject: [PATCH] exclude GetHashPow() --- src/main.cpp | 4 ++-- src/main.h | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e23f672..880d71e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2244,7 +2244,7 @@ bool CBlock::CheckBlock(CValidationState &state, bool fCheckPOW, bool fCheckMerk } // Check proof of work matches claimed amount - if (fCheckPOW && !CheckProofOfWork(GetPoWHash(), nBits)) + if (fCheckPOW && !CheckProofOfWork(GetHash(), nBits)) return state.DoS(50, error("CheckBlock() : proof of work failed")); // Check timestamp @@ -4666,7 +4666,7 @@ void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey) { - uint256 hash = pblock->GetPoWHash(); + uint256 hash = pblock->GetHash(); uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); if (hash > hashTarget) diff --git a/src/main.h b/src/main.h index a5ba4bb..eb876cf 100644 --- a/src/main.h +++ b/src/main.h @@ -1360,11 +1360,6 @@ public: vMerkleTree.clear(); } - uint256 GetPoWHash() const - { - return GetHash (); - } - CBlockHeader GetBlockHeader() const { CBlockHeader block; @@ -1477,7 +1472,7 @@ public: } // Check the header - if (!CheckProofOfWork(GetPoWHash(), nBits)) + if (!CheckProofOfWork(GetHash(), nBits)) return error("CBlock::ReadFromDisk() : errors in block header"); return true; @@ -1490,7 +1485,7 @@ public: printf("CBlock(hash=%s, input=%s, PoW=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%"PRIszu")\n", GetHash().ToString().c_str(), HexStr(BEGIN(nVersion),BEGIN(nVersion)+80,false).c_str(), - GetPoWHash().ToString().c_str(), + GetHash().ToString().c_str(), nVersion, hashPrevBlock.ToString().c_str(), hashMerkleRoot.ToString().c_str(),