X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=contrib%2Fchash%2Fchash.php;fp=contrib%2Fchash%2Fchash.php;h=408b4660e553b50152a6044df95e8ed0f7acac4a;hp=acba7c98ea26b792523f46fe79546572708912c9;hb=57adde2ad243a28700a9e1352e6c9eafaa90cfc4;hpb=32fe31b8ec8dc8e7fefe7343e9be44fbb8f94895 diff --git a/contrib/chash/chash.php b/contrib/chash/chash.php index acba7c98..408b4660 100644 --- a/contrib/chash/chash.php +++ b/contrib/chash/chash.php @@ -218,7 +218,7 @@ function flushCheckPointFile ($hash) { $GLOBALS['total_found'] . ':' . $GLOBALS['total_restarts'] . ':' . $GLOBALS['hash_cycles'] . ':' . - base64_encode($GLOBALS['nonce']) . ':' . + base64_encode((float) $GLOBALS['nonce']) . ':' . $hash . ':' . $GLOBALS['root_hash'] . ':' . base64_encode(gzcompress(serialize($GLOBALS['found_hashes']))) @@ -243,7 +243,7 @@ function addFoundHash ($hash) { 'modula_hash' => $GLOBALS['modula_hash'], 'genesis_hash' => $GLOBALS['genesis_hash'], 'root_hash' => $GLOBALS['root_hash'], - 'nonce' => $GLOBALS['nonce'], + 'nonce' => (float) $GLOBALS['nonce'], 'iter' => $GLOBALS['iteration'], 'hashes_block' => $GLOBALS['hashes_block'], 'hash_cycles' => $GLOBALS['hash_cycles'], @@ -364,12 +364,12 @@ if (is_readable(CHECK_POINT)) { $GLOBALS['total_found'] = $data[3]; $GLOBALS['total_restarts'] = $data[4]; $GLOBALS['hash_cycles'] = intval($data[5]); - $GLOBALS['nonce'] = base64_decode($data[7]); + $GLOBALS['nonce'] = (float) base64_decode($data[6]); $GLOBALS['root_hash'] = $data[8]; $GLOBALS['found_hashes'] = unserialize(gzuncompress(base64_decode($data[9]))); // Set modula hash - setModulaHash($data[6]); + setModulaHash($data[7]); } else { // Create nonce (small) initNonce();