Skip to content

Commit

Permalink
sserver BEAM: Fix the job-id compatibility issue with lolMiner
Browse files Browse the repository at this point in the history
  • Loading branch information
YihaoPeng authored and SwimmingTiger committed Apr 2, 2019
1 parent c728e32 commit 5cef5e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/beam/StratumMinerBeam.cc
Expand Up @@ -69,7 +69,7 @@ void StratumMinerBeam::handleRequest_Submit(
return;
}

uint32_t jobId = jsonRoot["id"].uint32_hex();
uint32_t jobId = strtoul(jsonRoot["id"].str().c_str(), nullptr, 10);
uint64_t nonce = jsonRoot["nonce"].uint64_hex();
string output = jsonRoot["output"].str();

Expand Down
2 changes: 1 addition & 1 deletion src/beam/StratumSessionBeam.cc
Expand Up @@ -72,7 +72,7 @@ void StratumSessionBeam::sendMiningNotify(
<< Beam_DiffToTarget(currentJobDiff_).ToString();
string strNotify = Strings::Format(
"{"
"\"id\":\"%08x\","
"\"id\":\"%u\","
"\"jsonrpc\":\"2.0\","
"\"method\":\"job\","
"\"difficulty\":%u,"
Expand Down

0 comments on commit 5cef5e6

Please sign in to comment.