diff --git a/src/core/stratum_server.cpp b/src/core/stratum_server.cpp index a979cbe1e..f72da1a7e 100644 --- a/src/core/stratum_server.cpp +++ b/src/core/stratum_server.cpp @@ -936,6 +936,7 @@ nlohmann::json StratumSession::handle_submit(const nlohmann::json& params, const << ": block template changed (job=" << job_id << " job_prev=" << job_it->second.gbt_prevhash.substr(0, 16) << " current_prev=" << current_prevhash.substr(0, 16) << ")"; + ++doa_shares_; // DON'T set job.stale_info here — it would break ref_hash. // The share is still created and broadcast (matches p2pool behavior). // DOA tracking is for statistics/dashboard only. diff --git a/src/core/stratum_server.hpp b/src/core/stratum_server.hpp index 33f0f147d..7d6e68993 100644 --- a/src/core/stratum_server.hpp +++ b/src/core/stratum_server.hpp @@ -154,6 +154,7 @@ class StratumSession : public std::enable_shared_from_this uint64_t accepted_shares_ = 0; uint64_t rejected_shares_ = 0; uint64_t stale_shares_ = 0; + uint64_t doa_shares_ = 0; // block-template changed at submit (live-vs-frozen prevhash mismatch); accounting only, share still broadcasts std::chrono::steady_clock::time_point connected_at_; std::string session_id_;