Delete Verus junk, which breaks ARMv8/aarch64 builds

This commit is contained in:
Duke Leto
2019-11-04 08:17:27 -05:00
parent a918948401
commit f39cd2a473
19 changed files with 43 additions and 1261 deletions

View File

@@ -1,3 +1,4 @@
// Copyright (c) 2019 Hush Developers
// Copyright (c) 2018 Michael Toutonghi
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -25,55 +26,4 @@
#include "arith_uint256.h"
/** For POS blocks, the nNonce of a block header holds the entropy source for the POS contest
* in the latest VerusHash protocol
* */
class CPOSNonce : public uint256
{
public:
static bool NewPOSActive(int32_t height);
static bool NewNonceActive(int32_t height);
static arith_uint256 entropyMask;
static arith_uint256 posDiffMask;
CPOSNonce() : uint256() { }
CPOSNonce(const base_blob<256> &b) : uint256(b) { }
CPOSNonce(const std::vector<unsigned char> &vch) : uint256(vch) { }
int32_t GetPOSTarget() const
{
uint32_t nBits = 0;
for (const unsigned char *p = begin() + 3; p >= begin(); p--)
{
nBits <<= 8;
nBits += *p;
}
return nBits;
}
bool IsPOSNonce() const
{
arith_uint256 arNonce = UintToArith256(*this);
arith_uint256 tmpNonce = ((arNonce << 128) >> 128);
CVerusHashWriter hashWriter = CVerusHashWriter(SER_GETHASH, PROTOCOL_VERSION);
hashWriter << ArithToUint256(tmpNonce);
return (*this == ArithToUint256(UintToArith256(hashWriter.GetHash()) << 128 | tmpNonce));
}
void SetPOSTarget(uint32_t nBits)
{
CVerusHashWriter hashWriter = CVerusHashWriter(SER_GETHASH, PROTOCOL_VERSION);
arith_uint256 arNonce = (UintToArith256(*this) & entropyMask) | nBits;
hashWriter << ArithToUint256(arNonce);
(uint256 &)(*this) = ArithToUint256(UintToArith256(hashWriter.GetHash()) << 128 | arNonce);
}
void SetPOSEntropy(const uint256 &pastHash, uint256 txid, int32_t voutNum);
bool CheckPOSEntropy(const uint256 &pastHash, uint256 txid, int32_t voutNum);
};
#endif // BITCOIN_PRIMITIVES_NONCE_H