#include "pool_factory.hpp" const char* PoolFactory::MINING_POOL_NAME_OCEAN = "ocean"; const char* PoolFactory::MINING_POOL_NAME_NODERUNNERS = "noderunners"; const char* PoolFactory::MINING_POOL_NAME_BRAIINS = "braiins"; const char* PoolFactory::MINING_POOL_NAME_SATOSHI_RADIO = "satoshi_radio"; const char* PoolFactory::MINING_POOL_NAME_PUBLIC_POOL = "public_pool"; const char* PoolFactory::MINING_POOL_NAME_GOBRRR_POOL = "gobrrr_pool"; std::unique_ptr PoolFactory::createPool(const std::string& poolName) { static const std::unordered_map()>> poolFactories = { {MINING_POOL_NAME_OCEAN, []() { return std::make_unique(); }}, {MINING_POOL_NAME_NODERUNNERS, []() { return std::make_unique(); }}, {MINING_POOL_NAME_BRAIINS, []() { return std::make_unique(); }}, {MINING_POOL_NAME_SATOSHI_RADIO, []() { return std::make_unique(); }}, {MINING_POOL_NAME_PUBLIC_POOL, []() { return std::make_unique(); }}, {MINING_POOL_NAME_GOBRRR_POOL, []() { return std::make_unique(); }} }; auto it = poolFactories.find(poolName); if (it == poolFactories.end()) { return nullptr; } return it->second(); }