Remove now-unused methods from arith_uint256 and base_uint
- Methods that access the guts of arith_uint256 are removed, as these are incompatible between endians. Use uint256 instead - Serialization is no longer needed as arith_uint256's are never read or written - GetHash is never used on arith_uint256
This commit is contained in:
@@ -232,26 +232,6 @@ public:
|
||||
void SetHex(const std::string& str);
|
||||
std::string ToString() const;
|
||||
|
||||
unsigned char* begin()
|
||||
{
|
||||
return (unsigned char*)&pn[0];
|
||||
}
|
||||
|
||||
unsigned char* end()
|
||||
{
|
||||
return (unsigned char*)&pn[WIDTH];
|
||||
}
|
||||
|
||||
const unsigned char* begin() const
|
||||
{
|
||||
return (unsigned char*)&pn[0];
|
||||
}
|
||||
|
||||
const unsigned char* end() const
|
||||
{
|
||||
return (unsigned char*)&pn[WIDTH];
|
||||
}
|
||||
|
||||
unsigned int size() const
|
||||
{
|
||||
return sizeof(pn);
|
||||
@@ -268,40 +248,6 @@ public:
|
||||
assert(WIDTH >= 2);
|
||||
return pn[0] | (uint64_t)pn[1] << 32;
|
||||
}
|
||||
|
||||
unsigned int GetSerializeSize(int nType, int nVersion) const
|
||||
{
|
||||
return sizeof(pn);
|
||||
}
|
||||
|
||||
template<typename Stream>
|
||||
void Serialize(Stream& s, int nType, int nVersion) const
|
||||
{
|
||||
s.write((char*)pn, sizeof(pn));
|
||||
}
|
||||
|
||||
template<typename Stream>
|
||||
void Unserialize(Stream& s, int nType, int nVersion)
|
||||
{
|
||||
s.read((char*)pn, sizeof(pn));
|
||||
}
|
||||
|
||||
// Temporary for migration to blob160/256
|
||||
uint64_t GetCheapHash() const
|
||||
{
|
||||
return GetLow64();
|
||||
}
|
||||
void SetNull()
|
||||
{
|
||||
memset(pn, 0, sizeof(pn));
|
||||
}
|
||||
bool IsNull() const
|
||||
{
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
if (pn[i] != 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/** 256-bit unsigned big integer. */
|
||||
@@ -336,8 +282,6 @@ public:
|
||||
arith_uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL);
|
||||
uint32_t GetCompact(bool fNegative = false) const;
|
||||
|
||||
uint64_t GetHash(const arith_uint256& salt) const;
|
||||
|
||||
friend uint256 ArithToUint256(const arith_uint256 &);
|
||||
friend arith_uint256 UintToArith256(const uint256 &);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user