35 template<u
int64_t hash_target_high, u
int64_t hash_target_low, u
int64_t difficulty_high, u
int64_t difficulty_low>
44 hash_target = (hash_target << 64) | hash_target_low;
47 boost::multiprecision::uint256_t hash_value = std::numeric_limits<boost::multiprecision::uint256_t>::max() / hash_target;
49 val = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
52 val = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
55 val = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
58 val = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
bool init()
Definition: check_hash.h:41
bool test()
Definition: check_hash.h:63
crypto::hash hash
Definition: check_hash.h:70
static const size_t loop_count
Definition: check_hash.h:39
unsigned __int64 uint64_t
Definition: stdint.h:136
Definition: check_hash.h:36
boost::multiprecision::uint128_t difficulty_type
Definition: difficulty.h:41
#define SWAP64LE
Definition: int-util.h:313
cryptonote::difficulty_type difficulty
Definition: check_hash.h:71
POD_CLASS hash
Definition: hash.h:49
bool check_hash_128(const crypto::hash &hash, difficulty_type difficulty)
Definition: difficulty.cpp:177