Console: don't listen on a TCP port when local API is not enabled
This commit is contained in:
@@ -84,6 +84,7 @@ ConsoleCommands::ConsoleCommands(p2pool* pool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_pool->api() && m_pool->params().m_localStats) {
|
||||||
std::mt19937_64 rng(RandomDeviceSeed::instance);
|
std::mt19937_64 rng(RandomDeviceSeed::instance);
|
||||||
|
|
||||||
// Diffuse the initial state in case it has low quality
|
// Diffuse the initial state in case it has low quality
|
||||||
@@ -107,7 +108,6 @@ ConsoleCommands::ConsoleCommands(p2pool* pool)
|
|||||||
c = static_cast<char>(rng() % (127 - 32) + 32);
|
c = static_cast<char>(rng() % (127 - 32) + 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pool->api() && m_pool->params().m_localStats) {
|
|
||||||
m_pool->api()->set(p2pool_api::Category::LOCAL, "console",
|
m_pool->api()->set(p2pool_api::Category::LOCAL, "console",
|
||||||
[stdin_type, this](log::Stream& s)
|
[stdin_type, this](log::Stream& s)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user