From: Roland Häder Date: Wed, 15 Feb 2023 21:36:16 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aff4645ed121873fad9c4440fcba2b7208d3b65b;p=hub.git Continued: - changed some Y/N config keys to new is_*_enabled (boolean) - added a missing configuation key - updated 'core' --- diff --git a/application/hub/classes/factories/socket/class_SocketFactory.php b/application/hub/classes/factories/socket/class_SocketFactory.php index 557a4553f..f74dc2152 100644 --- a/application/hub/classes/factories/socket/class_SocketFactory.php +++ b/application/hub/classes/factories/socket/class_SocketFactory.php @@ -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__); } diff --git a/application/hub/classes/miner/chash/class_HubCoinMiner.php b/application/hub/classes/miner/chash/class_HubCoinMiner.php index 4933ac24a..85843b53c 100644 --- a/application/hub/classes/miner/chash/class_HubCoinMiner.php +++ b/application/hub/classes/miner/chash/class_HubCoinMiner.php @@ -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()) { diff --git a/application/hub/classes/miner/class_BaseHubMiner.php b/application/hub/classes/miner/class_BaseHubMiner.php index eec754f28..a7ed44562 100644 --- a/application/hub/classes/miner/class_BaseHubMiner.php +++ b/application/hub/classes/miner/class_BaseHubMiner.php @@ -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(); } diff --git a/application/hub/config.php b/application/hub/config.php index 736ae0004..48170c522 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -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 14567fcd5..ad17ce1c5 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 14567fcd5820f2fcc3c78e816e782f34b8d49e6d +Subproject commit ad17ce1c5fe13f2290e74bec676f23e65c2e9100