Skip to content

Commit

Permalink
Merge branch 'master' into cli
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-m-cyr authored May 27, 2018
2 parents 28290a9 + 1657cdf commit 3bb1a6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Fixed
- Reconnecting with mining pool improved [[#1135](https://github.com/ethereum-mining/ethminer/pull/1135)].
- Stratum nicehash. Avoid recalculating target with every job [[#1156](https://github.com/ethereum-mining/ethminer/pull/1156)].
- Drop duplicate stratum jobs (pool bug workaround) [[#1161](https://github.com/ethereum-mining/ethminer/pull/1161)].
- CLI11 command line parsing support added [[#1160](https://github.com/ethereum-mining/ethminer/pull/1160)].
### Removed
- Disabled Debug configuration for Visual Studio [[#69](https://github.com/ethereum-mining/ethminer/issues/69)] [[#1131](https://github.com/ethereum-mining/ethminer/pull/1131)].
9 changes: 9 additions & 0 deletions libpoolprotocols/PoolManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ PoolManager::PoolManager(PoolClient * client, Farm &farm, MinerType const & mine

p_client->onWorkReceived([&](WorkPackage const& wp)
{
for (auto h : m_headers)
if (h == wp.header)
{
cwarn << EthYellow "Duplicate job" << wp.header << " discarded" EthReset;
return;
}
m_headers.push_back(wp.header);
while (m_headers.size() > 4)
m_headers.pop_front();

cnote << "New job" << wp.header << " " + m_connections[m_activeConnectionIdx].Host() + p_client->ActiveEndPoint();
if (wp.boundary != m_lastBoundary)
Expand Down
1 change: 1 addition & 0 deletions libpoolprotocols/PoolManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace dev
std::thread m_workThread;

h256 m_lastBoundary = h256();
std::list<h256> m_headers;

PoolClient *p_client;
Farm &m_farm;
Expand Down

0 comments on commit 3bb1a6a

Please sign in to comment.