Cryptocurrency mining pool written in C++ for speed. Supports Stratum.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
638 B

#ifndef CONFIG_H_
#define CONFIG_H_
#include <cassert>
#include <cstring>
#include <boost/program_options.hpp>
#include <boost/cstdint.hpp>
#include "Log.h"
class Config
{
public:
Config();
~Config();
// Reading
template<class T>
T Get(std::string key)
{
T tmp;
try {
tmp = vm[key].as<T>();
} catch(std::exception& e) {
sLog.Error(LOG_GENERAL, "Failed to get config value for key '%s'", key.c_str());
}
return tmp;
}
// Containers
boost::program_options::variables_map vm;
};
extern Config sConfig;
#endif