Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6dabf77

Browse files
committedApr 30, 2018
Stratum Revised
Stratum implementation revised. Sanity checks over rpc messages Json messages built using Json::Value instead of string concatenation (better readable) Adjusted syntax for eth_SubmitHasrate (requires worker) Addresses and solves #1041 #1038 #1036 #1023 #936 #940
1 parent be77227 commit 6dabf77

File tree

3 files changed

+476
-127
lines changed

3 files changed

+476
-127
lines changed
 

‎libpoolprotocols/PoolManager.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,12 @@ void PoolManager::workLoop()
149149
std::string h = toHex(toCompactBigEndian(mp.rate(), 1));
150150
std::string res = h[0] != '0' ? h : h.substr(1);
151151

152-
p_client->submitHashrate("0x" + res);
152+
// Should be 32 bytes
153+
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_submithashrate
154+
std::ostringstream ss;
155+
ss << std::setw(64) << std::setfill('0') << res;
156+
157+
p_client->submitHashrate("0x" + ss.str());
153158
m_hashrateReportingTimePassed = 0;
154159
}
155160
}

0 commit comments

Comments
 (0)
This repository has been archived.