Fixed a bug with Letsencrypt certs

One of internal buffers was too small
This commit is contained in:
SChernykh 2024-11-27 19:49:05 +01:00
parent 1029faa02f
commit 86962eb7aa
2 changed files with 3 additions and 1 deletions

View file

@ -58,7 +58,8 @@ StratumServer::StratumServer(p2pool* pool)
, m_totalFailedShares(0)
, m_apiLastUpdateTime(0)
{
m_callbackBuf.resize(STRATUM_BUF_SIZE);
// Need a bigger buffer for the TLS handshake
m_callbackBuf.resize(STRATUM_CALLBACK_BUF_SIZE);
// Diffuse the initial state in case it has low quality
m_rng.discard(10000);

View file

@ -26,6 +26,7 @@ class p2pool;
class BlockTemplate;
static constexpr size_t STRATUM_BUF_SIZE = log::Stream::BUF_SIZE + 1;
static constexpr size_t STRATUM_CALLBACK_BUF_SIZE = 16384;
static constexpr int DEFAULT_STRATUM_PORT = 3333;
class StratumServer : public TCPServer