aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/miner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in various filesDimitris Apostolou2018-03-151-1/+1
|
* Merge pull request #3277Riccardo Spagni2018-03-051-2/+2
|\ | | | | | | | | | | | | | | | | 0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu) af773211 Stagenet (stoffu) cc9a0bee command_line: allow args to depend on more than one args (stoffu) 55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu) 450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu) 9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
| * Stagenetstoffu2018-03-051-2/+2
| |
* | Correct spelling mistakes.Edward Betts2018-03-051-1/+1
|/
* Merge pull request #3255Riccardo Spagni2018-02-201-11/+5
|\ | | | | | | 3962bcb2 Closes #2886: really ignore battery checking (Timothy D. Prime)
| * Closes #2886: really ignore battery checkingTimothy D. Prime2018-02-121-11/+5
| | | | | | | | Move option test first.
* | miner: restore std::cout precision after modificationmoneromooo-monero2018-02-021-1/+2
| | | | | | | | Coverity 136462
* | Update 2018 copyrightxmr-eric2018-01-261-1/+1
|/
* move includes around to lessen overall loadmoneromooo-monero2017-12-161-1/+4
|
* Implement missing miner functions on FreeBSDVasil Dimov2017-11-111-1/+105
| | | | | | | | | | | | | cryptonote::miner::get_system_times(): Fetch the system's total and idle time using sysctl kern.cp_time. cryptonote::miner::get_process_time(): Use the same implementation as Linux and OSX, the times(3) function conforms to POSIX.1 and is available on FreeBSD. cryptonote::miner::on_battery_power(): Try to fetch the battery status using sysctl hw.acpi.acline. If that fails (if ACPI is not enabled on the system), then try querying /dev/apm.
* Remove unused variables and fix typos in commentsVasil Dimov2017-11-111-4/+2
|
* Merge pull request #2597Riccardo Spagni2017-10-151-2/+1
|\ | | | | | | c4136134 miner: always update block template when starting (moneromooo-monero)
| * miner: always update block template when startingmoneromooo-monero2017-10-071-2/+1
| | | | | | | | | | This fixes using the previous address when starting mining, then stopping and restarting with a different address
* | Subaddresseskenshi842017-10-071-1/+3
|/
* Fix AC power supply detection on LinuxGuillaume LE VAILLANT2017-09-081-13/+0
| | | | | The /sys/class/power_supply/*/present file usually does not exist for AC power supplies.
* Merge pull request #2283Riccardo Spagni2017-08-151-1/+1
|\ | | | | | | d1f204d6 miner: set thread name before logging (moneromooo-monero)
| * miner: set thread name before loggingmoneromooo-monero2017-08-121-1/+1
| |
* | Merge pull request #2232Riccardo Spagni2017-08-151-1/+1
|\ \ | |/ |/| | | 87b5ede9 miner: fix ignoring battery from command line (moneromooo-monero)
| * miner: fix ignoring battery from command linemoneromooo-monero2017-07-311-1/+1
| |
* | Merge pull request #2147Riccardo Spagni2017-08-071-26/+86
|\ \ | |/ |/| | | 94717021 fix on_battery_power for linux (Ryan Mehta)
| * fix on_battery_power for linuxRyan Mehta2017-07-061-26/+86
| | | | | | | | fix ac/battery linux
* | miner: fix background mining options parsingmoneromooo-monero2017-07-121-2/+2
|/ | | | | They were set as uint8_t, which boost was apparently treating as a character type, rather than a numeric type
* Add OSX background miningjethro2017-06-081-1/+37
| | | | | Implements miner::get_system_times, miner::get_process_time and miner::on_battery_power for OSX so that background mining works on OSX.
* Add expected total reward to RPC "getblocktemplate".assylias2017-04-191-1/+3
| | | | Only works from V5 fork onward - returns 0 before that block.
* Merge pull request #1946Riccardo Spagni2017-04-111-0/+2
|\ | | | | | | a38343bf miner: add a debug log in pause and resume (moneromooo-monero)
| * miner: add a debug log in pause and resumemoneromooo-monero2017-03-311-0/+2
| |
* | Add other possible paths of AC power status file on LinuxGuillaume LE VAILLANT2017-03-281-3/+5
|/
* core: avoid possible reordering bugs wth tx/bloch hash cachemoneromooo-monero2017-03-251-2/+2
|
* core: cache tx and block hashes in the respective classesmoneromooo-monero2017-03-231-0/+2
| | | | An idea from smooth
* update copyright year, fix occasional lack of newline at line endRiccardo Spagni2017-02-211-1/+1
|
* Merge pull request #1733Riccardo Spagni2017-02-211-4/+3
|\ | | | | | | a493c0b1 BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so required a definition. (Dion Ahmetaj)
| * BACKGROUND_MINING_MINER_MONITOR_INVERVAL_IN_SECONDS was odr-used, so ↵Dion Ahmetaj2017-02-151-4/+3
| | | | | | | | | | | | required a definition. Instead of adding a declaration to cpp file, I changed it to non odr-used.
* | More robust battery status handling.Dion Ahmetaj2017-02-161-19/+58
|/ | | | | | 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.
* Added a note about smart mining to status command. Fixed up a bug where I ↵Dion Ahmetaj2017-02-101-3/+3
| | | | 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.
* Changed ac_line_status to on_battery_power.Dion Ahmetaj2017-02-101-5/+5
|
* Cleaned up some logging. Thanks to moneromooo for help.Dion Ahmetaj2017-02-101-20/+20
|
* Added some //TODO comments pertaining to returning enums instead of bools in ↵Dion Ahmetaj2017-02-101-0/+5
| | | | order to be better able to handle failure states.
* Moved around checking of AC power in order to bail quicker to sleep if not ↵Dion Ahmetaj2017-02-101-4/+6
| | | | plugged in.
* Moved setting of previous process times to block where background mining is ↵Dion Ahmetaj2017-02-101-14/+11
| | | | started, and added an explicit sleep in that block to wait for some mining to occur.
* Set background mining started bool to false on bg thread start. If ↵Dion Ahmetaj2017-02-101-0/+1
| | | | mining::stop then mining::start, idle logic is re-run instead of starting immediately (if it was running before stop).
* Background/smart mining. If a users' computer is plugged into a powerDion Ahmetaj2017-02-101-6/+394
| | | | | | | | | | | 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).
* extract some basic code from libcryptonote_core into libcryptonote_basickenshi842017-02-081-0/+414