Prepare XMRig-HAC fork for public release
- Add DragonX coin and rx/hush algorithm support - Update branding to XMRig-HAC / dragonx.is - Update repository URLs to git.hush.is - Replace example wallet addresses with placeholders - Update .gitignore for build directories - Document fork changes in README and CHANGELOG
This commit is contained in:
@@ -94,7 +94,14 @@ bool xmrig::Job::setBlob(const char *blob)
|
||||
|
||||
bool xmrig::Job::setSeedHash(const char *hash)
|
||||
{
|
||||
if (!hash || (strlen(hash) != kMaxSeedSize * 2)) {
|
||||
if (!hash) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const size_t len = strlen(hash);
|
||||
// Accept any even-length hex string up to kMaxSeedSize*2 chars.
|
||||
// RX_HUSH genesis key is 23 bytes (46 hex chars), not always 32.
|
||||
if (len == 0 || len > kMaxSeedSize * 2 || (len % 2) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -102,7 +109,7 @@ bool xmrig::Job::setSeedHash(const char *hash)
|
||||
m_rawSeedHash = hash;
|
||||
# endif
|
||||
|
||||
m_seed = Cvt::fromHex(hash, kMaxSeedSize * 2);
|
||||
m_seed = Cvt::fromHex(hash, len);
|
||||
|
||||
return !m_seed.empty();
|
||||
}
|
||||
@@ -169,6 +176,12 @@ size_t xmrig::Job::nonceOffset() const
|
||||
return 147;
|
||||
}
|
||||
|
||||
// HUSH/DragonX has 140-byte header with nonce at offset 108
|
||||
// (version:4 + prevHash:32 + merkleRoot:32 + saplingRoot:32 + nTime:4 + nBits:4)
|
||||
if (algorithm() == Algorithm::RX_HUSH) {
|
||||
return 108;
|
||||
}
|
||||
|
||||
return 39;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user