35template<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>();
Definition check_hash.h:37
bool init()
Definition check_hash.h:41
cryptonote::difficulty_type difficulty
Definition check_hash.h:71
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
#define SWAP64LE
Definition int-util.h:285
POD_CLASS hash
Definition hash.h:49
boost::multiprecision::uint128_t difficulty_type
Definition difficulty.h:41
bool check_hash_128(const crypto::hash &hash, difficulty_type difficulty)
Definition difficulty.cpp:177
unsigned __int64 uint64_t
Definition stdint.h:136