From: Roland Häder Date: Mon, 28 Apr 2014 09:12:04 +0000 (+0200) Subject: Removed hashesPerBlock display + reduced blocked size as it is now much harder to... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0999ee54b25a8ad89490219953eb80f8bb11bbc5;p=core.git Removed hashesPerBlock display + reduced blocked size as it is now much harder to find a good hash. Signed-off-by: Roland Häder --- diff --git a/contrib/chash/chash.php b/contrib/chash/chash.php index f4003c8a..3ba7e162 100644 --- a/contrib/chash/chash.php +++ b/contrib/chash/chash.php @@ -2,7 +2,7 @@ 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)); @@ -275,7 +275,6 @@ while (TRUE) { // Calculate sums $sumNonce = calculateSumFromHash($nonceHash); - //print('hashesPerBlock=' . $hashesPerBlock . PHP_EOL); // Time spend in loop $testTime = abs(microtime(TRUE) - $timeDisplay); @@ -286,7 +285,7 @@ while (TRUE) { // 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); @@ -302,9 +301,6 @@ while (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 @@ -318,8 +314,11 @@ while (TRUE) { 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;