aboutsummaryrefslogtreecommitdiff
path: root/src/arith_uint256.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-12-16 15:47:29 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-01-05 15:45:36 +0100
commit30007fda76aa7ba4e4090f7a16298874a7722926 (patch)
tree9b2a2e70e0ac9169aac94ea70a8d539d467c7874 /src/arith_uint256.h
parentedc720479d0749a000d5a6970da6d2d72657cf38 (diff)
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
Diffstat (limited to 'src/arith_uint256.h')
-rw-r--r--src/arith_uint256.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/arith_uint256.h b/src/arith_uint256.h
index b69eef6769..ec8e15997f 100644
--- a/src/arith_uint256.h
+++ b/src/arith_uint256.h
@@ -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 &);
};