error_reporting(E_ALL | E_STRICT);
define('HASH_ALGO', MHASH_RIPEMD320);
-define('BLOCK_SIZE', 1000);
+define('BLOCK_SIZE', 100);
define('NONCE_INCREMENT', 0.0000000001);
define('START_TIME', microtime(TRUE));
// Calculate sums
$sumNonce = calculateSumFromHash($nonceHash);
- //print('hashesPerBlock=' . $hashesPerBlock . PHP_EOL);
// Time spend in loop
$testTime = abs(microtime(TRUE) - $timeDisplay);
// Only every second
if ($testTime >= 1) {
// Display hash rate
- print ('hashesPerBlock=' . $hashesPerBlock . ',hashrate=' . $hashrate . ' hashes/sec.' . PHP_EOL);
+ print ('hashrate=' . $hashrate . ' hashes/sec.' . PHP_EOL);
// Reset timer
$timeDisplay = microtime(TRUE);
//print ('sumModula=' . $sumModula . PHP_EOL);
} // END - while
- // Add amount of hashes to block (double-hash)
- $hashesPerBlock += $iter * 2 + 2;
-
// If the iteration is zero, then no hash is found
if ($iter == 0) {
// Bad block found
continue;
} // END - if
+ // Add amount of hashes to block (double-hash)
+ $hashesPerBlock += $iter * 2 + 2;
+
// Found hash:
- //print ('nonceHash=' . $nonceHash .',iter=' . $iter . PHP_EOL);
+ print ('FOUND: nonceHash=' . $nonceHash .',iter=' . $iter . PHP_EOL);
// Use nonceHash as next modula hash
$modulaHash = $nonceHash;