|
|
@ -1089,7 +1089,6 @@ void static RandomXMiner() |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char randomxHash[RANDOMX_HASH_SIZE]; |
|
|
|
rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); |
|
|
|
char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific
|
|
|
@ -1153,7 +1152,6 @@ void static RandomXMiner() |
|
|
|
Mining_start = (uint32_t)time(NULL); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag);
|
|
|
|
rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); |
|
|
|
// Use the initial key at the start of the chain, until the first key block
|
|
|
@ -1168,7 +1166,6 @@ void static RandomXMiner() |
|
|
|
|
|
|
|
randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); |
|
|
|
rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//TODO: this is hardcoded to use 2 threads instead of the number of mining threads
|
|
|
@ -1302,7 +1299,7 @@ void static RandomXMiner() |
|
|
|
rxdebug("%s: Checking solution against target\n"); |
|
|
|
pblock->nSolution = soln; |
|
|
|
solutionTargetChecks.increment(); |
|
|
|
fprintf(stderr,"%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get()); |
|
|
|
// fprintf(stderr,"%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get());
|
|
|
|
B = *pblock; |
|
|
|
h = UintToArith256(B.GetHash()); |
|
|
|
|
|
|
@ -1683,7 +1680,7 @@ void static BitcoinMiner() |
|
|
|
LogPrint("pow", "- Checking solution against target\n"); |
|
|
|
pblock->nSolution = soln; |
|
|
|
solutionTargetChecks.increment(); |
|
|
|
rxdebug("%s: solutionTargetChecks=%lu\n", solutionTargetChecks.get()); |
|
|
|
// fprintf(stderr, "%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get());
|
|
|
|
B = *pblock; |
|
|
|
h = UintToArith256(B.GetHash()); |
|
|
|
/*for (z=31; z>=16; z--)
|
|
|
|