public SendWorkComplete ( bool solutionFound, uint solution, uint hashesDone ) : void | ||
solutionFound | bool | |
solution | uint | |
hashesDone | uint | |
리턴 | void |
public void Update(Connection conn) { if (mCurrentWork != null) { bool threadsAllDone = true; foreach (WorkThread t in mThreads) { if (!t.IsWorkDone()) { threadsAllDone = false; break; } } if (threadsAllDone) { uint hashes = 0; uint solution = 0; bool solutionFound = false; foreach (WorkThread t in mThreads) { hashes += t.HashesDone; if (t.SolutionFound) { solutionFound = true; solution = t.Solution; } } conn.SendWorkComplete(solutionFound, Scrypt.ByteReverse(solution), hashes); mCurrentWork = null; mTimer.Stop(); mHashRate = (uint)((double)hashes / mTimer.GetDuration()); } } }
public void Update(Connection conn) { if (mCurrentWork != null) { bool threadsAllDone = true; foreach (WorkThread t in mThreads) { if (!t.IsWorkDone()) { threadsAllDone = false; break; } } if (threadsAllDone) { uint hashes = 0; uint solution = 0; bool solutionFound = false; foreach (WorkThread t in mThreads) { hashes += t.HashesDone; if (t.SolutionFound) { solutionFound = true; solution = t.Solution; } } conn.SendWorkComplete(solutionFound, Scrypt.ByteReverse(solution), hashes); mCurrentWork = null; mTimer.Stop(); mHashRate = (uint)((double)hashes / mTimer.GetDuration()); } } }