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/chain.h | |
| 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/chain.h')
| -rw-r--r-- | src/chain.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/chain.h b/src/chain.h index acb29b667..76d13bd0a 100644 --- a/src/chain.h +++ b/src/chain.h @@ -199,6 +199,9 @@ public: unsigned int nBits; unsigned int nNonce; + // Dogecoin: Keep the Scrypt hash as well as SHA256 + uint256 hashBlockPoW; + //! (memory only) Sequential id assigned to distinguish order in which blocks are received. int32_t nSequenceId; @@ -226,6 +229,7 @@ public: nTime = 0; nBits = 0; nNonce = 0; + hashBlockPoW = uint256(); } CBlockIndex() @@ -242,6 +246,7 @@ public: nTime = block.nTime; nBits = block.nBits; nNonce = block.nNonce; + hashBlockPoW = block.GetPoWHash(); } CDiskBlockPos GetBlockPos() const { @@ -280,6 +285,11 @@ public: return *phashBlock; } + uint256 GetBlockPoWHash() const + { + return hashBlockPoW; + } + int64_t GetBlockTime() const { return (int64_t)nTime; @@ -388,6 +398,7 @@ public: READWRITE(nTime); READWRITE(nBits); READWRITE(nNonce); + READWRITE(hashBlockPoW); } uint256 GetBlockHash() const |