Add deterministic RandomX block header hashing

This commit is contained in:
Capri 2026-09-14 20:18:52 +00:00
commit 2431ea4588
Signed by: VextaProject
SSH key fingerprint: SHA256:739BZv8LvIDY2tR7lXLy/IQ6MaGTQtYcG9GNvCjmpVM
7 changed files with 84 additions and 8 deletions

View file

@ -96,6 +96,14 @@ public:
uint256 GetPoWAlgoHash(const Consensus::Params& params) const;
/**
* Calculate the RandomX proof-of-work hash using an explicit seed key.
*
* The input is the canonical serialized 80-byte block header.
* The seed is supplied in raw uint256 serialization byte order.
*/
uint256 GetRandomXPoWHash(const uint256& seed) const;
int64_t GetBlockTime() const
{
return (int64_t)nTime;