addFoundHash($nonceHash);
} // END - while
+ // Flush check-point file
+ flushCheckPointFile($GLOBALS['current_hash']);
+
// Time taken for one
$timeBlock = abs(microtime(true) - $timeBlock);
$reward = abs($timeBlock - $timeBadHashes) / max(1, $hashRate) * $GLOBALS['hashes_block'] / max(1, $GLOBALS['block_size']) * 1000;
print('timeBlock=' . $timeBlock . ',timeBadHashes=' . $timeBadHashes . ',hashesPerBlock=' . $GLOBALS['hashes_block'] .',reward=' . $reward . PHP_EOL);
- // Double difficulty
- $GLOBALS['difficulty'] = $GLOBALS['difficulty'] * 2;
+ // Increase difficulty
+ $GLOBALS['difficulty'] = $GLOBALS['difficulty']++;
// Block completed
$GLOBALS['total_hashes'] += $GLOBALS['hashes_block'];