Delete Verus junk, which breaks ARMv8/aarch64 builds
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Copyright (c) 2009-2013 The Bitcoin Core developers
|
||||
// Copyright (c) 2019 The Hush developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -51,7 +52,9 @@ public:
|
||||
uint256 hashFinalSaplingRoot;
|
||||
uint32_t nTime;
|
||||
uint32_t nBits;
|
||||
CPOSNonce nNonce;
|
||||
//CPOSNonce nNonce;
|
||||
uint256 nNonce;
|
||||
|
||||
std::vector<unsigned char> nSolution;
|
||||
|
||||
CBlockHeader()
|
||||
@@ -98,57 +101,14 @@ public:
|
||||
uint256 GetSHA256DHash() const;
|
||||
static void SetSHA256DHash();
|
||||
|
||||
uint256 GetVerusHash() const;
|
||||
static void SetVerusHash();
|
||||
|
||||
bool GetRawVerusPOSHash(uint256 &ret, int32_t nHeight) const;
|
||||
bool GetVerusPOSHash(arith_uint256 &ret, int32_t nHeight, CAmount value) const; // value is amount of stake tx
|
||||
uint256 GetVerusEntropyHash(int32_t nHeight) const;
|
||||
|
||||
uint256 GetVerusV2Hash() const;
|
||||
static void SetVerusHashV2();
|
||||
|
||||
int64_t GetBlockTime() const
|
||||
{
|
||||
return (int64_t)nTime;
|
||||
}
|
||||
|
||||
uint32_t GetVerusPOSTarget() const
|
||||
{
|
||||
uint32_t nBits = 0;
|
||||
|
||||
for (const unsigned char *p = nNonce.begin() + 3; p >= nNonce.begin(); p--)
|
||||
{
|
||||
nBits <<= 8;
|
||||
nBits += *p;
|
||||
}
|
||||
return nBits;
|
||||
}
|
||||
|
||||
bool IsVerusPOSBlock() const
|
||||
{
|
||||
if ( ASSETCHAINS_LWMAPOS != 0 )
|
||||
return nNonce.IsPOSNonce();
|
||||
else return(0);
|
||||
}
|
||||
|
||||
void SetVerusPOSTarget(uint32_t nBits)
|
||||
{
|
||||
CVerusHashWriter hashWriter = CVerusHashWriter(SER_GETHASH, PROTOCOL_VERSION);
|
||||
|
||||
arith_uint256 arNonce = UintToArith256(nNonce);
|
||||
|
||||
// printf("before svpt: %s\n", ArithToUint256(arNonce).GetHex().c_str());
|
||||
|
||||
arNonce = (arNonce & CPOSNonce::entropyMask) | nBits;
|
||||
|
||||
// printf("after clear: %s\n", ArithToUint256(arNonce).GetHex().c_str());
|
||||
|
||||
hashWriter << ArithToUint256(arNonce);
|
||||
nNonce = CPOSNonce(ArithToUint256(UintToArith256(hashWriter.GetHash()) << 128 | arNonce));
|
||||
|
||||
// printf(" after svpt: %s\n", nNonce.GetHex().c_str());
|
||||
}
|
||||
};
|
||||
|
||||
// this class is used to address the type mismatch that existed between nodes, where block headers
|
||||
|
||||
Reference in New Issue
Block a user