From: svost Date: Tue, 13 Feb 2024 17:18:59 +0000 (+0300) Subject: Headers cleanup X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=ec37513297179011b0c13d269a7147aa2df079c1 Headers cleanup --- diff --git a/src/crypto/scrypt/generic/scrypt-generic.cpp b/src/crypto/scrypt/generic/scrypt-generic.cpp index c4dc5b5..4e7af46 100644 --- a/src/crypto/scrypt/generic/scrypt-generic.cpp +++ b/src/crypto/scrypt/generic/scrypt-generic.cpp @@ -29,6 +29,8 @@ #include "scrypt.h" +#include + #ifdef _MSC_VER #define INLINE __inline #else diff --git a/src/crypto/scrypt/intrin/scrypt-intrin.cpp b/src/crypto/scrypt/intrin/scrypt-intrin.cpp index 04613b9..3336271 100644 --- a/src/crypto/scrypt/intrin/scrypt-intrin.cpp +++ b/src/crypto/scrypt/intrin/scrypt-intrin.cpp @@ -35,6 +35,8 @@ #include "scrypt.h" +#include + static inline uint32_t le32dec(const void *pp) { const uint8_t *p = (uint8_t const *)pp; diff --git a/src/main.cpp b/src/main.cpp index 79f8e92..d864ade 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,7 @@ #include "kernel.h" #include "random.h" #include "wallet.h" +#include "scrypt.h" #include #include @@ -1236,6 +1237,10 @@ void static InvalidChainFound(CBlockIndex* pindexNew) DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str()); } +uint256 CBlock::GetHash() const +{ + return scrypt_blockhash((const uint8_t*)&nVersion); +} void CBlock::UpdateTime(const CBlockIndex* pindexPrev) { diff --git a/src/main.h b/src/main.h index 205110e..b6bf6c7 100644 --- a/src/main.h +++ b/src/main.h @@ -9,7 +9,6 @@ #include "sync.h" #include "net.h" #include "script.h" -#include "scrypt.h" #include #include @@ -935,10 +934,7 @@ public: return (nBits == 0); } - uint256 GetHash() const - { - return scrypt_blockhash((const uint8_t*)&nVersion); - } + uint256 GetHash() const; int64_t GetBlockTime() const { diff --git a/src/scrypt.h b/src/scrypt.h index 7d5aadc..7a94911 100644 --- a/src/scrypt.h +++ b/src/scrypt.h @@ -2,7 +2,6 @@ #define SCRYPT_H #include -#include #include "uint256.h" #define SCRYPT_BUFFER_SIZE (131072 + 63)