Browse Source

Merge branch 'master' into peercoin

peercoin
Intel 11 years ago
parent
commit
e425d8137c
  1. 4
      src/server/poolserver/Stratum/Server.h
  2. 2
      src/server/poolserver/Stratum/ShareLimiter.cpp

4
src/server/poolserver/Stratum/Server.h

@ -133,8 +133,6 @@ namespace Stratum
void _OnAccept(ClientPtr client, const boost::system::error_code& error) void _OnAccept(ClientPtr client, const boost::system::error_code& error)
{ {
_StartAccept();
if (!error) { if (!error) {
if (client->Start()) { if (client->Start()) {
_clients.insert(client); _clients.insert(client);
@ -143,6 +141,8 @@ namespace Stratum
} else { } else {
sLog.Debug(LOG_STRATUM, "Failed to accept stratum client"); sLog.Debug(LOG_STRATUM, "Failed to accept stratum client");
} }
_StartAccept();
} }
private: private:

2
src/server/poolserver/Stratum/ShareLimiter.cpp

@ -33,7 +33,7 @@ namespace Stratum
_shares.pop_front(); _shares.pop_front();
} }
uint32 interval = std::min(curTime - _startTime, uint64(sConfig.Get<uint32>("RetargetTimeBuffer"))); uint32 interval = sConfig.Get<uint32>("RetargetTimeBuffer");
// Calculate shares/min // Calculate shares/min
double speed = double(_shares.size()*60) / double(interval); double speed = double(_shares.size()*60) / double(interval);

Loading…
Cancel
Save