mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 00:07:47 +00:00
Print P2Pool version
This commit is contained in:
parent
2a3cd13b19
commit
7d66864b01
4 changed files with 22 additions and 1 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
static void usage()
|
||||
{
|
||||
printf(
|
||||
printf("P2Pool %s\n"
|
||||
"\nUsage:\n\n" \
|
||||
"--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!\n"
|
||||
"--host IP address of your Monero node, default is 127.0.0.1\n"
|
||||
|
@ -39,6 +39,7 @@ static void usage()
|
|||
"--help Show this help message\n\n"
|
||||
"Example command line:\n\n"
|
||||
"%s --host 127.0.0.1 --rpc-port 18081 --zmq-port 18083 --wallet YOUR_WALLET_ADDRESS --stratum 0.0.0.0:%d --p2p 0.0.0.0:%d\n\n",
|
||||
p2pool::VERSION,
|
||||
#ifdef _WIN32
|
||||
"p2pool.exe"
|
||||
#else
|
||||
|
|
|
@ -50,6 +50,8 @@ p2pool::p2pool(int argc, char* argv[])
|
|||
, m_updateSeed(true)
|
||||
, m_submitBlockData{}
|
||||
{
|
||||
LOGINFO(1, log::LightCyan() << VERSION);
|
||||
|
||||
if (!m_params->m_wallet.valid()) {
|
||||
LOGERR(1, "Invalid wallet address. Try \"p2pool --help\".");
|
||||
panic();
|
||||
|
|
16
src/util.cpp
16
src/util.cpp
|
@ -29,6 +29,22 @@ static constexpr char log_category_prefix[] = "Util ";
|
|||
|
||||
namespace p2pool {
|
||||
|
||||
#define STR2(X) STR(X)
|
||||
#define STR(X) #X
|
||||
|
||||
const char* VERSION = "v1.1 (built"
|
||||
#if defined(__clang__)
|
||||
" with clang/" __clang_version__
|
||||
#elif defined(__GNUC__)
|
||||
" with GCC/" STR2(__GNUC__) "." STR2(__GNUC_MINOR__) "." STR2(__GNUC_PATCHLEVEL__)
|
||||
#elif defined(_MSC_VER)
|
||||
" with MSVC/" STR2(_MSC_VER)
|
||||
#endif
|
||||
" on " __DATE__ ")";
|
||||
|
||||
#undef STR2
|
||||
#undef STR
|
||||
|
||||
MinerCallbackHandler::~MinerCallbackHandler() {}
|
||||
|
||||
void panic()
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
namespace p2pool {
|
||||
|
||||
extern const char* VERSION;
|
||||
|
||||
template<typename T> struct not_implemented { enum { value = 0 }; };
|
||||
|
||||
struct nocopy_nomove
|
||||
|
|
Loading…
Reference in a new issue