mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 11:29:23 +00:00
Pool block test: check RandomX hash where possible
This commit is contained in:
parent
f3045a5e80
commit
326b2d7a04
1 changed files with 13 additions and 1 deletions
|
@ -84,6 +84,14 @@ TEST(pool_block, deserialize)
|
|||
ASSERT_EQ(b.m_broadcasted, false);
|
||||
ASSERT_EQ(b.m_wantBroadcast, false);
|
||||
|
||||
hash seed;
|
||||
{
|
||||
std::stringstream s;
|
||||
s << "6fc9c4a55eb513eb31955c084d9342e0082987f9e42da042449b7c9001176d3a";
|
||||
s >> seed;
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
class RandomX_Hasher_Test : public RandomX_Hasher_Base
|
||||
{
|
||||
public:
|
||||
|
@ -107,8 +115,12 @@ TEST(pool_block, deserialize)
|
|||
return false;
|
||||
}
|
||||
} hasher;
|
||||
#else
|
||||
RandomX_Hasher hasher(nullptr);
|
||||
hasher.set_seed(seed);
|
||||
#endif
|
||||
|
||||
hash seed, pow_hash;
|
||||
hash pow_hash;
|
||||
ASSERT_EQ(b.get_pow_hash(&hasher, 0, seed, pow_hash), true);
|
||||
|
||||
std::stringstream s;
|
||||
|
|
Loading…
Reference in a new issue