diff options
Diffstat (limited to 'src/primitives/block.cpp')
| -rw-r--r-- | src/primitives/block.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index 9a979094c..4cfc576f0 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -6,6 +6,7 @@ #include "primitives/block.h" #include "hash.h" +#include "crypto/scrypt.h" #include "tinyformat.h" #include "utilstrencodings.h" #include "crypto/common.h" @@ -15,6 +16,13 @@ uint256 CBlockHeader::GetHash() const return SerializeHash(*this); } +uint256 CBlockHeader::GetPoWHash() const +{ + uint256 thash; + scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(thash)); + return thash; +} + std::string CBlock::ToString() const { std::stringstream s; |