Hide tempHash from the public API

This commit is contained in:
tevador
2019-12-01 18:19:09 +01:00
parent 219c02e1e5
commit 3910d49b49
4 changed files with 17 additions and 17 deletions

View File

@@ -122,15 +122,13 @@ void mine(randomx_vm* vm, std::atomic<uint32_t>& atomicNonce, AtomicHash& result
void* noncePtr = blockTemplate + 39;
auto nonce = atomicNonce.fetch_add(1);
uint64_t tempHash[8];
store32(noncePtr, nonce);
randomx_calculate_hash_first(vm, tempHash, blockTemplate, sizeof(blockTemplate));
randomx_calculate_hash_first(vm, blockTemplate, sizeof(blockTemplate));
while (nonce < noncesCount) {
nonce = atomicNonce.fetch_add(1);
store32(noncePtr, nonce);
randomx_calculate_hash_next(vm, tempHash, blockTemplate, sizeof(blockTemplate), &hash);
randomx_calculate_hash_next(vm, blockTemplate, sizeof(blockTemplate), &hash);
result.xorWith(hash);
}
}