define('HASH_ALGO', MHASH_RIPEMD320);
define('BLOCK_SIZE', 1000);
-define('NONCE_INCREMENT', 0.00001);
+define('NONCE_INCREMENT', 0.0000000001);
define('START_TIME', microtime(TRUE));
/**
// Init counter
$iter = 0;
+ $iterSecond = 0;
// Now start the "mining" ...
$timeHash = microtime(TRUE);
$testTime = abs(microtime(TRUE) - $timeDisplay);
// Calculate hashrate/sec
- $hashrate = 1 / $testTime * $iter * 2 + 2;
+ $hashrate = 1 / $testTime * $iterSecond * 2;
// Only every second
if ($testTime >= 1) {
// Reset timer
$timeDisplay = microtime(TRUE);
+ $iterSecond = 0;
} // END - if
// Next round
$iter++;
+ $iterSecond++;
//print ('nonce=' . $nonce . ',iter=' . $iter . PHP_EOL);
//print ('nonceHash=' . $nonceHash . PHP_EOL);
//print ('sumNonce=' . $sumNonce . PHP_EOL);