aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/primitives/block.cpp')
-rw-r--r--src/primitives/block.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp
index c61dc5fb5..f272347a3 100644
--- a/src/primitives/block.cpp
+++ b/src/primitives/block.cpp
@@ -6,21 +6,21 @@
#include <primitives/block.h>
#include <hash.h>
-#include <crypto/scrypt.h>
#include <tinyformat.h>
#include <utilstrencodings.h>
#include <crypto/common.h>
-uint256 CBlockHeader::GetHash() const
+void CBlockHeader::SetAuxpow (std::unique_ptr<CAuxPow> apow)
{
- return SerializeHash(*this);
-}
-
-uint256 CBlockHeader::GetPoWHash() const
-{
- uint256 thash;
- scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(thash));
- return thash;
+ if (apow != nullptr)
+ {
+ auxpow.reset(apow.release());
+ SetAuxpowFlag(true);
+ } else
+ {
+ auxpow.reset();
+ SetAuxpowFlag(false);
+ }
}
std::string CBlock::ToString() const