Default log level 3

Also refactored default port numbers
This commit is contained in:
SChernykh
2021-09-18 10:03:06 +02:00
parent b4ea125a8a
commit 5c92920619
12 changed files with 63 additions and 32 deletions

View File

@@ -17,6 +17,8 @@
#include "common.h"
#include "params.h"
#include "stratum_server.h"
#include "p2p_server.h"
namespace p2pool {
@@ -68,6 +70,26 @@ Params::Params(int argc, char* argv[])
m_apiPath = argv[++i];
}
}
if (m_stratumAddresses.empty()) {
const int stratum_port = DEFAULT_STRATUM_PORT;
char buf[log::Stream::BUF_SIZE + 1];
log::Stream s(buf);
s << "[::]:" << stratum_port << ",0.0.0.0:" << stratum_port << '\0';
m_stratumAddresses = buf;
}
if (m_p2pAddresses.empty()) {
const int p2p_port = DEFAULT_P2P_PORT;
char buf[log::Stream::BUF_SIZE + 1];
log::Stream s(buf);
s << "[::]:" << p2p_port << ",0.0.0.0:" << p2p_port << '\0';
m_p2pAddresses = buf;
}
}
bool Params::ok() const