29 #include "gtest/gtest.h" 42 hash_target = (hash_target << 64) | low;
43 boost::multiprecision::uint256_t hash_value = std::numeric_limits<boost::multiprecision::uint256_t>::max() / hash_target;
45 ((
uint64_t*)&h)[0] = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
47 ((
uint64_t*)&h)[1] = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
49 ((
uint64_t*)&h)[2] = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
51 ((
uint64_t*)&h)[3] = (hash_value & 0xffffffffffffffff).convert_to<uint64_t>();
#define ASSERT_FALSE(condition)
TEST(difficulty, check_hash)
bool check_hash(const crypto::hash &hash, difficulty_type difficulty)
unsigned __int64 uint64_t
boost::multiprecision::uint128_t difficulty_type
#define ASSERT_TRUE(condition)