From 575742078c64fb168734052a60aa37cb918a6ee5 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sun, 12 Jun 2022 22:32:50 +0200 Subject: [PATCH] Better fix for daemon solo mining with ZMQ --- src/base/net/stratum/DaemonClient.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/base/net/stratum/DaemonClient.cpp b/src/base/net/stratum/DaemonClient.cpp index b2e8f7d44..821045e9d 100644 --- a/src/base/net/stratum/DaemonClient.cpp +++ b/src/base/net/stratum/DaemonClient.cpp @@ -863,6 +863,9 @@ void xmrig::DaemonClient::ZMQParse() LOG_DEBUG(CYAN("tcp-zmq://%s:%u") BLACK_BOLD(" read ") CYAN_BOLD("%zu") BLACK_BOLD(" bytes") " %s", m_pool.host().data(), m_pool.zmq_port(), msg.size() - 1, msg.data()); # endif + // Clear previous hash and check daemon height to guarantee that xmrig will call get_block_template RPC later + // We can't call get_block_template directly because daemon is not ready yet + m_prevHash = nullptr; send(kGetHeight); }