Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.14'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.bumpversion.cfg
#	CMakeLists.txt
#	libpoolprotocols/stratum/EthStratumClient.cpp
  • Loading branch information
chfast committed May 1, 2018
2 parents 2a8fdb5 + 08e16bc commit fa3ea1f
Show file tree
Hide file tree
Showing 4 changed files with 501 additions and 129 deletions.
7 changes: 7 additions & 0 deletions ethminer/MinerAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,13 @@ class MinerCLI
mgr.addConnection(m_endpoints[i]);
}

// If we are in simulation mode we add a fake connection
if (m_mode == OperationMode::Simulation) {
PoolConnection con(URI("http://-:0"));
mgr.clearConnections();
mgr.addConnection(con);
}

#if API_CORE
Api api(this->m_api_port, f);
#endif
Expand Down
7 changes: 6 additions & 1 deletion libpoolprotocols/PoolManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ void PoolManager::workLoop()
std::string h = toHex(toCompactBigEndian(mp.rate(), 1));
std::string res = h[0] != '0' ? h : h.substr(1);

p_client->submitHashrate("0x" + res);
// Should be 32 bytes
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_submithashrate
std::ostringstream ss;
ss << std::setw(64) << std::setfill('0') << res;

p_client->submitHashrate("0x" + ss.str());
m_hashrateReportingTimePassed = 0;
}
}
Expand Down
Loading

0 comments on commit fa3ea1f

Please sign in to comment.