Stratum: check found P2Pool shares one at a time

Parallel checks could result in a deadlock
This commit is contained in:
SChernykh
2024-10-31 12:10:10 +01:00
parent 031a1c2eea
commit a3006cb51a
3 changed files with 87 additions and 67 deletions
+4 -2
View File
@@ -147,6 +147,8 @@ private:
struct SubmittedShare
{
uv_work_t m_req;
bool m_allocated;
StratumServer* m_server;
StratumClient* m_client;
bool m_clientIPv6;
@@ -180,8 +182,6 @@ private:
} m_result;
};
std::vector<SubmittedShare*> m_submittedSharesPool;
struct HashrateData
{
uint64_t m_timestamp;
@@ -204,6 +204,8 @@ private:
std::atomic<uint64_t> m_apiLastUpdateTime;
std::deque<SubmittedShare*> m_pendingShareChecks;
void update_hashrate_data(uint64_t hashes, uint64_t timestamp);
void api_update_local_stats(uint64_t timestamp);