diff --git a/CMakeLists.txt b/CMakeLists.txt index 121e711a..d2009b84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,8 @@ set(HEADERS src/base/kernel/Entry.h src/base/kernel/Process.h src/base/kernel/Signals.h + src/base/net/Pool.h + src/base/net/Pools.h src/base/tools/Arguments.h src/base/tools/Handle.h src/base/tools/String.h @@ -54,7 +56,6 @@ set(HEADERS src/common/net/Client.h src/common/net/Id.h src/common/net/Job.h - src/common/net/Pool.h src/common/net/Storage.h src/common/net/strategies/FailoverStrategy.h src/common/net/strategies/SinglePoolStrategy.h @@ -112,6 +113,8 @@ set(SOURCES src/base/kernel/Entry.cpp src/base/kernel/Process.cpp src/base/kernel/Signals.cpp + src/base/net/Pool.cpp + src/base/net/Pools.cpp src/base/tools/Arguments.cpp src/base/tools/Handle.cpp src/base/tools/String.cpp @@ -127,7 +130,6 @@ set(SOURCES src/common/log/Log.cpp src/common/net/Client.cpp src/common/net/Job.cpp - src/common/net/Pool.cpp src/common/net/strategies/FailoverStrategy.cpp src/common/net/strategies/SinglePoolStrategy.cpp src/common/net/SubmitResult.cpp diff --git a/src/Summary.cpp b/src/Summary.cpp index dc671438..60a9278f 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -28,9 +28,9 @@ #include +#include "base/net/Pool.h" #include "common/cpu/Cpu.h" #include "common/log/Log.h" -#include "common/net/Pool.h" #include "core/Config.h" #include "core/Controller.h" #include "crypto/Asm.h" diff --git a/src/common/net/Pool.cpp b/src/base/net/Pool.cpp similarity index 99% rename from src/common/net/Pool.cpp rename to src/base/net/Pool.cpp index 585e4596..c53377e8 100644 --- a/src/common/net/Pool.cpp +++ b/src/base/net/Pool.cpp @@ -29,7 +29,7 @@ #include -#include "common/net/Pool.h" +#include "base/net/Pool.h" #include "rapidjson/document.h" diff --git a/src/common/net/Pool.h b/src/base/net/Pool.h similarity index 99% rename from src/common/net/Pool.h rename to src/base/net/Pool.h index c051b0ee..59bc9eb8 100644 --- a/src/common/net/Pool.h +++ b/src/base/net/Pool.h @@ -111,6 +111,6 @@ private: }; -typedef std::vector Pools; +//typedef std::vector Pools; #endif /* XMRIG_POOL_H */ diff --git a/src/base/net/Pools.cpp b/src/base/net/Pools.cpp new file mode 100644 index 00000000..ab5609fc --- /dev/null +++ b/src/base/net/Pools.cpp @@ -0,0 +1,32 @@ +/* XMRig + * Copyright 2010 Jeff Garzik + * Copyright 2012-2014 pooler + * Copyright 2014 Lucas Jones + * Copyright 2014-2016 Wolf9466 + * Copyright 2016 Jay D Dee + * Copyright 2017-2018 XMR-Stak , + * Copyright 2018-2019 SChernykh + * Copyright 2016-2019 XMRig , + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include "base/net/Pools.h" + + +xmrig::Pools::Pools() +{ + +} diff --git a/src/base/net/Pools.h b/src/base/net/Pools.h new file mode 100644 index 00000000..5d2aa0d4 --- /dev/null +++ b/src/base/net/Pools.h @@ -0,0 +1,51 @@ +/* XMRig + * Copyright 2010 Jeff Garzik + * Copyright 2012-2014 pooler + * Copyright 2014 Lucas Jones + * Copyright 2014-2016 Wolf9466 + * Copyright 2016 Jay D Dee + * Copyright 2017-2018 XMR-Stak , + * Copyright 2018-2019 SChernykh + * Copyright 2016-2019 XMRig , + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef XMRIG_POOLS_H +#define XMRIG_POOLS_H + + +#include + + +#include "base/net/Pool.h" + + +namespace xmrig { + + +class Pools +{ +public: + Pools(); + +private: + std::vector m_data; +}; + + +} /* namespace xmrig */ + + +#endif /* XMRIG_POOLS_H */ diff --git a/src/common/config/CommonConfig.cpp b/src/common/config/CommonConfig.cpp index 4d02de60..9a2f8c9e 100644 --- a/src/common/config/CommonConfig.cpp +++ b/src/common/config/CommonConfig.cpp @@ -109,19 +109,19 @@ void xmrig::CommonConfig::printPools() { for (size_t i = 0; i < m_activePools.size(); ++i) { if (!isColors()) { - Log::i()->text(" * POOL #%-7zu%s variant=%s, TLS=%d", + Log::i()->text(" * POOL #%-7zu%s algo=%s, TLS=%d", i + 1, m_activePools[i].url(), - m_activePools[i].algorithm().variantName(), + m_activePools[i].algorithm().shortName(), static_cast(m_activePools[i].isTLS()) ); } else { - Log::i()->text(GREEN_BOLD(" * ") WHITE_BOLD("POOL #%-7zu") "\x1B[1;%dm%s\x1B[0m variant " WHITE_BOLD("%s"), + Log::i()->text(GREEN_BOLD(" * ") WHITE_BOLD("POOL #%-7zu") "\x1B[1;%dm%s\x1B[0m algo " WHITE_BOLD("%s"), i + 1, m_activePools[i].isTLS() ? 32 : 36, m_activePools[i].url(), - m_activePools[i].algorithm().variantName() + m_activePools[i].algorithm().shortName() ); } } diff --git a/src/common/config/CommonConfig.h b/src/common/config/CommonConfig.h index 619f4b03..058d6edd 100644 --- a/src/common/config/CommonConfig.h +++ b/src/common/config/CommonConfig.h @@ -26,12 +26,9 @@ #define XMRIG_COMMONCONFIG_H -#include - - +#include "base/net/Pools.h" #include "base/tools/String.h" #include "common/interfaces/IConfig.h" -#include "common/net/Pool.h" #include "common/xmrig.h" diff --git a/src/common/config/ConfigLoader.cpp b/src/common/config/ConfigLoader.cpp index edd80c4d..e5eeb2b9 100644 --- a/src/common/config/ConfigLoader.cpp +++ b/src/common/config/ConfigLoader.cpp @@ -45,12 +45,12 @@ #include "common/config/ConfigLoader.h" #include "common/config/ConfigWatcher.h" #include "common/interfaces/IConfig.h" -#include "common/net/Pool.h" #include "common/Platform.h" #include "core/ConfigCreator.h" #include "core/ConfigLoader_platform.h" #include "rapidjson/document.h" #include "rapidjson/error/en.h" +#include "rapidjson/fwd.h" xmrig::ConfigWatcher *xmrig::ConfigLoader::m_watcher = nullptr; diff --git a/src/common/net/Client.h b/src/common/net/Client.h index a05710fc..4594a90f 100644 --- a/src/common/net/Client.h +++ b/src/common/net/Client.h @@ -30,10 +30,10 @@ #include +#include "base/net/Pool.h" #include "common/crypto/Algorithm.h" #include "common/net/Id.h" #include "common/net/Job.h" -#include "common/net/Pool.h" #include "common/net/Storage.h" #include "common/net/SubmitResult.h" #include "rapidjson/fwd.h" diff --git a/src/common/net/strategies/FailoverStrategy.h b/src/common/net/strategies/FailoverStrategy.h index 9fe9f9d8..cfc8e92a 100644 --- a/src/common/net/strategies/FailoverStrategy.h +++ b/src/common/net/strategies/FailoverStrategy.h @@ -29,9 +29,9 @@ #include +#include "base/net/Pool.h" #include "common/interfaces/IClientListener.h" #include "common/interfaces/IStrategy.h" -#include "common/net/Pool.h" class Client; diff --git a/src/net/strategies/DonateStrategy.h b/src/net/strategies/DonateStrategy.h index d012c1b9..eab01370 100644 --- a/src/net/strategies/DonateStrategy.h +++ b/src/net/strategies/DonateStrategy.h @@ -30,7 +30,7 @@ #include -#include "common/net/Pool.h" +#include "base/net/Pool.h" #include "common/interfaces/IClientListener.h" #include "common/interfaces/IStrategy.h" #include "common/interfaces/IStrategyListener.h" diff --git a/src/workers/CpuThread.cpp b/src/workers/CpuThread.cpp index 4b539bb3..c1daaf5a 100644 --- a/src/workers/CpuThread.cpp +++ b/src/workers/CpuThread.cpp @@ -27,7 +27,6 @@ #include "common/cpu/Cpu.h" #include "common/log/Log.h" -#include "common/net/Pool.h" #include "crypto/Asm.h" #include "Mem.h" #include "rapidjson/document.h"