|
@ -411,6 +411,13 @@ void doFarm(MinerType _m, string const& _remote, unsigned _recheckPeriod) |
|
|
exit(0); |
|
|
exit(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void stopMiningAfterXBlocks(eth::Client *_c, unsigned _start, unsigned _mining) |
|
|
|
|
|
{ |
|
|
|
|
|
if (_c->isMining() && _c->blockChain().details().number - _start == _mining) |
|
|
|
|
|
_c->stopMining(); |
|
|
|
|
|
this_thread::sleep_for(chrono::milliseconds(100)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
int main(int argc, char** argv) |
|
|
int main(int argc, char** argv) |
|
|
{ |
|
|
{ |
|
|
cout << "\x1b[30mEthBlack\x1b[0m" << endl; |
|
|
cout << "\x1b[30mEthBlack\x1b[0m" << endl; |
|
@ -1642,19 +1649,13 @@ int main(int argc, char** argv) |
|
|
while (!g_exit) |
|
|
while (!g_exit) |
|
|
{ |
|
|
{ |
|
|
console.repl(); |
|
|
console.repl(); |
|
|
if (c->isMining() && c->blockChain().details().number - n == mining) |
|
|
stopMiningAfterXBlocks(c, n, mining); |
|
|
c->stopMining(); |
|
|
|
|
|
this_thread::sleep_for(chrono::milliseconds(100)); |
|
|
|
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
while (!g_exit) |
|
|
while (!g_exit) |
|
|
{ |
|
|
stopMiningAfterXBlocks(c, n, mining); |
|
|
if (c->isMining() && c->blockChain().details().number - n == mining) |
|
|
|
|
|
c->stopMining(); |
|
|
|
|
|
this_thread::sleep_for(chrono::milliseconds(100)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
while (!g_exit) |
|
|
while (!g_exit) |
|
|