Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit 54a60de

Browse files
committedMay 2, 2018
Why 2 separate loops ?
1 parent be767a8 commit 54a60de

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎libethcore/Farm.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,15 @@ class Farm: public FarmFace
192192
p.ms = std::chrono::duration_cast<std::chrono::milliseconds>(now - m_lastStart).count();
193193
m_lastStart = now;
194194

195-
// Collect
195+
// Collect & Reset
196196
for (auto const& i : m_miners)
197197
{
198198
uint64_t minerHashCount = i->hashCount();
199+
i->resetHashCount();
199200
p.hashes += minerHashCount;
200201
p.minersHashes.push_back(minerHashCount);
201202
}
202203

203-
// Reset
204-
for (auto const& i : m_miners)
205-
i->resetHashCount();
206-
207204
if (p.hashes > 0)
208205
m_lastProgresses.push_back(p);
209206

0 commit comments

Comments
 (0)
This repository has been archived.