]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/filter/miner/class_MinerPhpRequirementsFilter.php
'scrypt' is better now a "feature" which needs to be tested and enabled in a pre...
[hub.git] / application / hub / main / filter / miner / class_MinerPhpRequirementsFilter.php
index 8e3286dd02c720dd957ed9358f9c614e7e54328b..d75c2a05a510fdcb50f29d8e41b8fac4202c0ee5 100644 (file)
@@ -66,6 +66,16 @@ class MinerPhpRequirementsFilter extends BaseMinerFilter implements Filterable {
                        $checksFailed++;
                } // END -if
 
+               // If scrypt() is not found (ext-scrypt) then the "HubCoins reward" is not working
+               if ((extension_loaded('scrypt')) && (is_callable('scrypt'))) {
+                       // Mark it as working
+                       self::createDebugInstance(__CLASS__)->debugOutput('FILTER[' . __METHOD__ . ':' . __LINE__ . '] ext-scrypt and a callable scrypt() function found. "HubCoin reward" feature enabled.');
+                       $this->getConfigInstance()->setConfigEntry('extension_scrypt_loaded', TRUE);
+               } else {
+                       // Not working (not all have ext-scrypt installed
+                       self::createDebugInstance(__CLASS__)->debugOutput('FILTER[' . __METHOD__ . ':' . __LINE__ . '] ext-scrypt not found or scrypt() function not found. "HubCoin reward" feature disabled.');
+               }
+
                // Are all tests passed?
                if ($checkPassed === FALSE) {
                        // Throw an exception