mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-23 03:49:23 +00:00
Added version
console command
This commit is contained in:
parent
a83d6deec1
commit
dbb4efb98a
1 changed files with 7 additions and 1 deletions
|
@ -140,7 +140,7 @@ typedef struct cmd {
|
||||||
cmdfunc *func;
|
cmdfunc *func;
|
||||||
} cmd;
|
} cmd;
|
||||||
|
|
||||||
static cmdfunc do_help, do_status, do_loglevel, do_addpeers, do_droppeers, do_showpeers, do_showworkers, do_showbans, do_outpeers, do_inpeers, do_exit;
|
static cmdfunc do_help, do_status, do_loglevel, do_addpeers, do_droppeers, do_showpeers, do_showworkers, do_showbans, do_outpeers, do_inpeers, do_exit, do_version;
|
||||||
|
|
||||||
#ifdef WITH_RANDOMX
|
#ifdef WITH_RANDOMX
|
||||||
static cmdfunc do_start_mining, do_stop_mining;
|
static cmdfunc do_start_mining, do_stop_mining;
|
||||||
|
@ -162,6 +162,7 @@ static cmd cmds[] = {
|
||||||
{ STRCONST("stop_mining"), "", "stop mining", do_stop_mining },
|
{ STRCONST("stop_mining"), "", "stop mining", do_stop_mining },
|
||||||
#endif
|
#endif
|
||||||
{ STRCONST("exit"), "", "terminate p2pool", do_exit },
|
{ STRCONST("exit"), "", "terminate p2pool", do_exit },
|
||||||
|
{ STRCONST("version"), "", "show p2pool version", do_version },
|
||||||
{ STRCNULL, NULL, NULL, NULL }
|
{ STRCNULL, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -277,6 +278,11 @@ static void do_exit(p2pool *m_pool, const char * /* args */)
|
||||||
m_pool->stop();
|
m_pool->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void do_version(p2pool* /* m_pool */, const char* /* args */)
|
||||||
|
{
|
||||||
|
LOGINFO(0, log::LightCyan() << VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
void ConsoleCommands::allocCallback(uv_handle_t* handle, size_t /*suggested_size*/, uv_buf_t* buf)
|
void ConsoleCommands::allocCallback(uv_handle_t* handle, size_t /*suggested_size*/, uv_buf_t* buf)
|
||||||
{
|
{
|
||||||
ConsoleCommands* pThis = static_cast<ConsoleCommands*>(handle->data);
|
ConsoleCommands* pThis = static_cast<ConsoleCommands*>(handle->data);
|
||||||
|
|
Loading…
Reference in a new issue