diff options
| author | Warren Togami <[email protected]> | 2014-05-21 20:24:15 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2018-09-19 19:21:49 +0100 |
| commit | b506efbe747ba31ee1f41be14cdbc0c30dfcf67f (patch) | |
| tree | 875694e0a15e29a8d93b7ed4b969246c1aa65a99 /src/primitives/block.cpp | |
| parent | Replace test data with Dogecoin values (diff) | |
| download | discoin-b506efbe747ba31ee1f41be14cdbc0c30dfcf67f.tar.xz discoin-b506efbe747ba31ee1f41be14cdbc0c30dfcf67f.zip | |
Litecoin: Scrypt n=1024 Pow hash based upon Colin Percival's Tarnsnap (2009) Modified by Artforz, coblee, pooler, wtogami, Nikolay Belikov, Adrian Gallagher
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; |