even more debug
This commit is contained in:
@@ -1036,7 +1036,7 @@ void static RandomXMiner()
|
|||||||
miningTimer.start();
|
miningTimer.start();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fprintf(stderr,"trying %s Mining with randomx\n",SMART_CHAIN_SYMBOL);
|
fprintf(stderr,"RandomXMiner: mining %s with randomx\n",SMART_CHAIN_SYMBOL);
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@@ -1241,15 +1241,18 @@ void static RandomXMiner()
|
|||||||
solutionTargetChecks.increment();
|
solutionTargetChecks.increment();
|
||||||
B = *pblock;
|
B = *pblock;
|
||||||
h = UintToArith256(B.GetHash());
|
h = UintToArith256(B.GetHash());
|
||||||
|
|
||||||
|
fprintf(stderr,"RandomXMiner: h=");
|
||||||
|
for (z=31; z>=0; z--)
|
||||||
|
fprintf(stderr,"%02x",((uint8_t *)&h)[z]);
|
||||||
|
fprintf(stderr," , hashTarget=");
|
||||||
|
for (z=31; z>=0; z--)
|
||||||
|
fprintf(stderr,"%02x",((uint8_t *)&hashTarget)[z]);
|
||||||
|
fprintf(stderr,"\n");
|
||||||
|
|
||||||
if ( h > hashTarget )
|
if ( h > hashTarget )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"RandomXMiner: h > hashTarget h=");
|
fprintf(stderr,"RandomXMiner: h > hashTarget");
|
||||||
for (z=31; z>=0; z--)
|
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&h)[z]);
|
|
||||||
fprintf(stderr," , hashTarget=");
|
|
||||||
for (z=31; z>=0; z--)
|
|
||||||
fprintf(stderr,"%02x",((uint8_t *)&hashTarget)[z]);
|
|
||||||
fprintf(stderr,"\n");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1295,7 +1298,7 @@ void static RandomXMiner()
|
|||||||
std::vector<unsigned char> sol_char(randomxHash, randomxHash+32); // = GetMinimalFromIndices(index_vector, DIGITBITS);
|
std::vector<unsigned char> sol_char(randomxHash, randomxHash+32); // = GetMinimalFromIndices(index_vector, DIGITBITS);
|
||||||
bool found = validBlock(sol_char);
|
bool found = validBlock(sol_char);
|
||||||
if (found) {
|
if (found) {
|
||||||
LogPrintf("HushRandomXMiner found solution!\n");
|
fprintf(stderr,"RandomXMiner: found solution!\n");
|
||||||
// If we find a POW solution, do not try other solutions
|
// If we find a POW solution, do not try other solutions
|
||||||
// because they become invalid as we created a new block in blockchain.
|
// because they become invalid as we created a new block in blockchain.
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user