Commit graph

25 commits

Author SHA1 Message Date
Riccardo Spagni
da2c662cf2
Merge pull request #2232
87b5ede9 miner: fix ignoring battery from command line (moneromooo-monero)
2017-08-15 20:45:02 +02:00
Riccardo Spagni
ce52d94cb7
Merge pull request #2147
94717021 fix on_battery_power for linux (Ryan Mehta)
2017-08-07 14:47:43 +02:00
moneromooo-monero
87b5ede908
miner: fix ignoring battery from command line 2017-07-31 08:36:57 +01:00
moneromooo-monero
f5f985c018
miner: fix background mining options parsing
They were set as uint8_t, which boost was apparently treating
as a character type, rather than a numeric type
2017-07-12 11:22:50 +01:00
Ryan Mehta
94717021ef fix on_battery_power for linux
fix ac/battery linux
2017-07-06 10:03:55 -07:00
jethro
1b75ad91aa Add OSX background mining
Implements miner::get_system_times, miner::get_process_time and
miner::on_battery_power for OSX so that background mining works on OSX.
2017-06-08 09:26:09 -04:00
assylias
bff90264b8
Add expected total reward to RPC "getblocktemplate".
Only works from V5 fork onward - returns 0 before that block.
2017-04-19 18:28:16 +01:00
Riccardo Spagni
6353e5b0e5
Merge pull request #1946
a38343bf miner: add a debug log in pause and resume (moneromooo-monero)
2017-04-11 00:23:43 +02:00
moneromooo-monero
a38343bf68
miner: add a debug log in pause and resume 2017-03-31 20:01:58 +01:00
Guillaume LE VAILLANT
64377c90b5 Add other possible paths of AC power status file on Linux 2017-03-28 11:35:18 +02:00
moneromooo-monero
6d315459b6
core: avoid possible reordering bugs wth tx/bloch hash cache 2017-03-25 09:18:53 +00:00
moneromooo-monero
f065234b71
core: cache tx and block hashes in the respective classes
An idea from smooth
2017-03-23 09:25:17 +00:00
Riccardo Spagni
c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni
6994c85201
Merge pull request #1733
a493c0b1 BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required a definition. (Dion Ahmetaj)
2017-02-21 11:21:14 +02:00
Dion Ahmetaj
69ab14d91e More robust battery status handling.
Added an extra path to check for linux power supply status.
Added ignore battery option. If set to true, then when we can't figure out
the power status, we'll assume the system is plugged in.
2017-02-16 14:35:01 -05:00
Dion Ahmetaj
a493c0b196 BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required a definition.
Instead of adding a declaration to cpp file, I changed it to non odr-used.
2017-02-15 11:15:12 -05:00
Dion Ahmetaj
ad95e65028 Added a note about smart mining to status command. Fixed up a bug where I was resetting bg mining enabled instead of started. Upped the miner threshold. Also moved setting of enabled on start above miner thread creation since starting with true, then stopping, then starting with false resulted in race condition. 2017-02-10 18:07:43 -05:00
Dion Ahmetaj
e4dfd2fb63 Changed ac_line_status to on_battery_power. 2017-02-10 18:07:42 -05:00
Dion Ahmetaj
d2c7d0f6b0 Cleaned up some logging. Thanks to moneromooo for help. 2017-02-10 18:07:41 -05:00
Dion Ahmetaj
68652cd94d Added some //TODO comments pertaining to returning enums instead of bools in order to be better able to handle failure states. 2017-02-10 18:07:41 -05:00
Dion Ahmetaj
0b1045ed7d Moved around checking of AC power in order to bail quicker to sleep if not plugged in. 2017-02-10 18:07:40 -05:00
Dion Ahmetaj
2937fdbbbf Moved setting of previous process times to block where background mining is started, and added an explicit sleep in that block to wait for some mining to occur. 2017-02-10 18:07:40 -05:00
Dion Ahmetaj
21a1e0252f Set background mining started bool to false on bg thread start. If mining::stop then mining::start, idle logic is re-run instead of starting immediately (if it was running before stop). 2017-02-10 18:07:39 -05:00
Dion Ahmetaj
345ed4823c Background/smart mining. If a users' computer is plugged into a power
source, and CPU has been idle for some time, then begin mining to some
threshold (don't destroy the users' CPU).

This patch only supports windows and linux (I've only tested on Win64 and
Ubuntu).

The variables currently default to pretty conservative values (i.e. 20%
CPU mining threshold).
2017-02-10 18:07:39 -05:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Renamed from src/cryptonote_core/miner.cpp (Browse further)