mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #11385: Remove some unused functions and methods
46c9043
Remove some unused functions and methods (Pieter Wuille)
Pull request description:
In the case of CKey's destructor, it seems to have been an oversight in #8753 not to delete it. At this point, it results in the move constructors/assignment operators for CKey being deleted, which may have
a performance impact (requiring a pool allocation/copy/free, rather than just handing over the pointer from one CKey to another)
Tree-SHA512: 89715bafe3e0bea2c46fc92bc6a1010360a3fee2719f97b81ca379581003409b0876b50f992208a3c13c7f5b77f1866db09954e7d102f6a452fe5d7aed2044a1
This commit is contained in:
parent
c8081ae192
commit
44b47017ef
14
src/hash.h
14
src/hash.h
@ -102,20 +102,6 @@ inline uint256 Hash(const T1 p1begin, const T1 p1end,
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Compute the 256-bit hash of the concatenation of three objects. */
|
||||
template<typename T1, typename T2, typename T3>
|
||||
inline uint256 Hash(const T1 p1begin, const T1 p1end,
|
||||
const T2 p2begin, const T2 p2end,
|
||||
const T3 p3begin, const T3 p3end) {
|
||||
static const unsigned char pblank[1] = {};
|
||||
uint256 result;
|
||||
CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
|
||||
.Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
|
||||
.Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0]))
|
||||
.Finalize((unsigned char*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Compute the 256-bit hash of the concatenation of three objects. */
|
||||
template<typename T1, typename T2, typename T3, typename T4>
|
||||
inline uint256 Hash(const T1 p1begin, const T1 p1end,
|
||||
|
@ -56,11 +56,6 @@ public:
|
||||
keydata.resize(32);
|
||||
}
|
||||
|
||||
//! Destructor (again necessary because of memlocking).
|
||||
~CKey()
|
||||
{
|
||||
}
|
||||
|
||||
friend bool operator==(const CKey& a, const CKey& b)
|
||||
{
|
||||
return a.fCompressed == b.fCompressed &&
|
||||
|
@ -112,7 +112,6 @@ public:
|
||||
class uint160 : public base_blob<160> {
|
||||
public:
|
||||
uint160() {}
|
||||
explicit uint160(const base_blob<160>& b) : base_blob<160>(b) {}
|
||||
explicit uint160(const std::vector<unsigned char>& vch) : base_blob<160>(vch) {}
|
||||
};
|
||||
|
||||
@ -124,7 +123,6 @@ public:
|
||||
class uint256 : public base_blob<256> {
|
||||
public:
|
||||
uint256() {}
|
||||
explicit uint256(const base_blob<256>& b) : base_blob<256>(b) {}
|
||||
explicit uint256(const std::vector<unsigned char>& vch) : base_blob<256>(vch) {}
|
||||
|
||||
/** A cheap hash function that just returns 64 bits from the result, it can be
|
||||
|
Loading…
Reference in New Issue
Block a user