]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 15 Feb 2023 21:36:16 +0000 (22:36 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 15 Feb 2023 22:40:19 +0000 (23:40 +0100)
- changed some Y/N config keys to new is_*_enabled (boolean)
- added a missing configuation key
- updated 'core'

application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/miner/chash/class_HubCoinMiner.php
application/hub/classes/miner/class_BaseHubMiner.php
application/hub/config.php
core

index 557a4553f5c6bbfb2732559173db42f9d6685b7b..f74dc2152cd8eef17e58c00078ab0cf515c6ed51 100644 (file)
@@ -233,7 +233,7 @@ class SocketFactory extends BaseFactory {
 
                // Set the option to reuse the port
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Enabling re-use address ...');
-               if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tcp_socket_enable_reuse_address') == 'Y' && !$socketInstance->enableSocketReuseAddress()) {
+               if (FrameworkBootstrap::getConfigurationInstance()->isEnabled('tcp_socket_enable_reuse_address') && !$socketInstance->enableSocketReuseAddress()) {
                        // Handle this socket error
                        $socketInstance->handleSocketError(__METHOD__, __LINE__);
                }
index 4933ac24acdc95e132a72b98d48b831b3ea849ca..85843b53cd4a9214a310b72f8f7f0ba9ca9182cf 100644 (file)
@@ -74,7 +74,7 @@ class HubCoinMiner extends BaseHubMiner implements MinerHelper, Registerable {
         */
        protected function fillInBufferQueueWithTestUnits () {
                // Are test units enabled?
-               if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('miner_test_units_enabled') == 'N') {
+               if (!FrameworkBootstrap::getConfigurationInstance()->isEnabled('miner_test_units')) {
                        // They are disabled, so skip any further steps
                        return;
                } elseif ($this->getStateInstance()->isMinerStateVirgin()) {
index eec754f2842e431bf995cfecaff391f69a3dce73..a7ed445620b6cbfbdafe420dd9d2878729338786 100644 (file)
@@ -215,7 +215,7 @@ abstract class BaseHubMiner extends BaseHubSystem implements Updateable {
                        $this->fillInBufferQueueWithWorkUnits();
 
                        // Is the buffer still not filled and are test-packages allowed?
-                       if ((!$this->isInBufferQueueFilled()) && (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('miner_test_units_enabled') == 'Y')) {
+                       if (!$this->isInBufferQueueFilled() && FrameworkBootstrap::getConfigurationInstance()->isEnabled('miner_test_units')) {
                                // Then fill the in-buffer with (one) test-unit(s)
                                $this->fillInBufferQueueWithTestUnits();
                        }
index 736ae0004e37c9dd3c05c889dde39eff93fd4b77..48170c5221cc90a1e5967d53461496efca445d00 100644 (file)
@@ -793,8 +793,8 @@ $cfg->setConfigEntry('tcp_socket_accept_wait_sec', 3);
 // CFG: TCP-SOCKET-ACCEPT-WAIT-USEC
 $cfg->setConfigEntry('tcp_socket_accept_wait_usec', 0);
 
-// CFG: TCP-SOCKET-ENABLE-REUSE-ADDRESS
-$cfg->setConfigEntry('tcp_socket_enable_reuse_address', 'Y');
+// CFG: IS-TCP-SOCKET-ENABLE-REUSE-ADDRESS-ENABLED
+$cfg->setConfigEntry('is_tcp_socket_enable_reuse_address_enabled', true);
 
 // CFG: FILE-SOCKET-LISTEN-BACKLOG
 $cfg->setConfigEntry('file_socket_listen_backlog', 0);
@@ -1070,6 +1070,9 @@ $cfg->setConfigEntry('stacker_incoming_queue_max_size', 1000);
 // CFG: STACKER-OUTGOING-QUEUE-MAX-SIZE
 $cfg->setConfigEntry('stacker_outgoing_queue_max_size', 1000);
 
+// CFG: IS-MINER-TEST-UNITS-ENABLED
+$cfg->setConfigEntry('is_miner_test_units_enabled', true);
+
 ///////////////////////////////////////////////////////////////////////////////
 //                        Cruncher configuration
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/core b/core
index 14567fcd5820f2fcc3c78e816e782f34b8d49e6d..ad17ce1c5fe13f2290e74bec676f23e65c2e9100 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 14567fcd5820f2fcc3c78e816e782f34b8d49e6d
+Subproject commit ad17ce1c5fe13f2290e74bec676f23e65c2e9100