Implemented donate for KawPow.
This commit is contained in:
parent
dd8777c11b
commit
bbd3f05bf6
24 changed files with 320 additions and 166 deletions
|
@ -23,20 +23,19 @@
|
|||
#include "base/net/stratum/Client.h"
|
||||
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class IClientListener;
|
||||
|
||||
|
||||
class EthStratumClient : public Client
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(EthStratumClient)
|
||||
|
||||
EthStratumClient(int id, const char *agent, IClientListener *listener);
|
||||
|
||||
protected:
|
||||
~EthStratumClient() override = default;
|
||||
|
||||
protected:
|
||||
int64_t submit(const JobResult &result) override;
|
||||
|
@ -46,19 +45,17 @@ protected:
|
|||
bool handleResponse(int64_t id, const rapidjson::Value &result, const rapidjson::Value &error) override;
|
||||
void parseNotification(const char *method, const rapidjson::Value ¶ms, const rapidjson::Value &error) override;
|
||||
|
||||
void setExtraNonce(const rapidjson::Value &nonce);
|
||||
|
||||
private:
|
||||
const char *errorMessage(const rapidjson::Value &error) const;
|
||||
uint64_t extraNonce(const rapidjson::Value &result) const;
|
||||
uint64_t target(const rapidjson::Value ¶ms) const;
|
||||
void authorize();
|
||||
void onAuthorizeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
||||
void onSubscribeResponse(const rapidjson::Value &result, bool success, uint64_t elapsed);
|
||||
void setTarget(const rapidjson::Value ¶ms);
|
||||
void subscribe();
|
||||
|
||||
bool m_authorized = false;
|
||||
uint64_t m_target = 0;
|
||||
uint64_t m_extraNonce = 0;
|
||||
bool m_authorized = false;
|
||||
std::pair<uint64_t, String> m_extraNonce{};
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue