]> git.mxchange.org Git - core.git/blobdiff - contrib/chash/chash.php
Continued:
[core.git] / contrib / chash / chash.php
index c37216ab3bb3826443e2a9ae03496c2da1db9cef..41af8db1c97077b765294049e5dbeb811a62e4e2 100644 (file)
@@ -262,7 +262,7 @@ function flushCheckPointFile ($hash) {
                base64_encode((float) $GLOBALS['nonce']) . ':' .
                $hash . ':' .
                $GLOBALS['root_hash'] . ':' .
-               base64_encode(gzcompress(serialize($GLOBALS['found_hashes'])))
+               base64_encode(gzcompress(json_encode($GLOBALS['found_hashes'])))
        );
 
        // Set time
@@ -407,7 +407,7 @@ if (is_readable(CHECK_POINT)) {
        $GLOBALS['hash_cycles']    = intval($data[5]);
        $GLOBALS['nonce']          = (float) base64_decode($data[6]);
        $GLOBALS['root_hash']      = $data[8];
-       $GLOBALS['found_hashes']   = unserialize(gzuncompress(base64_decode($data[9])));
+       $GLOBALS['found_hashes']   = json_decode(gzuncompress(base64_decode($data[9])));
 
        // Set modula hash
        setModulaHash($data[7]);
@@ -614,6 +614,3 @@ while (TRUE) {
 
        print ('totalReward=' . $GLOBALS['total_reward'] . ',blockValue=' . $blockValue . ',rewardPerHour=' . $rewardPerHour . PHP_EOL);
 } // END - while
-
-// [EOF]
-?>