uint256: Remove unnecessary crypto/common.h use

This commit is contained in:
Karl-Johan Alm
2018-05-17 14:50:15 +09:00
parent cb25cd6aa1
commit bf2e010973
5 changed files with 21 additions and 18 deletions

View File

@@ -12,7 +12,6 @@
#include <stdint.h>
#include <string>
#include <vector>
#include <crypto/common.h>
/** Template base class for fixed-sized opaque blobs. */
template<unsigned int BITS>
@@ -123,16 +122,6 @@ class uint256 : public base_blob<256> {
public:
uint256() {}
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
* used when the contents are considered uniformly random. It is not appropriate
* when the value can easily be influenced from outside as e.g. a network adversary could
* provide values to trigger worst-case behavior.
*/
uint64_t GetCheapHash() const
{
return ReadLE64(data);
}
};
/* uint256 from const char *.