Commit graph

62 commits

Author SHA1 Message Date
moneromooo-monero
064ab12340
functional_tests: add more blockchain related tests
Related to emission, reorgs, getting tx data back, output
distribution and histogram
2019-04-11 11:07:58 +00:00
Riccardo Spagni
38717dafc0
Merge pull request #5381
def40161 miner: fix race when stopping mining with start mining enabled (moneromooo-monero)
2019-04-11 13:03:32 +02:00
moneromooo-monero
a2561653cb
wallet: new option to start background mining
The setup-background-mining option can be used to select
background mining when a wallet loads. The user will be asked
the first time the wallet is created.
2019-04-04 18:10:45 +00:00
moneromooo-monero
def4016171 miner: fix race when stopping mining with start mining enabled 2019-04-01 19:28:50 +00:00
Riccardo Spagni
574c399386
Merge pull request #5288
39f000b3 miner: fix possible exit crash due to race in stop (moneromooo-monero)
2019-04-01 17:20:25 +02:00
Riccardo Spagni
429930534d
Merge pull request #5185
59478c80 daemon: new mining_status command (moneromooo-monero)
2019-03-17 17:55:32 +02:00
moneromooo-monero
39f000b394
miner: fix possible exit crash due to race in stop
If a thread asks to stop the miner, m_stop will be set, and
that thread will wait to join. If the main thread is exiting
at that time, it will ask the miner to stop, but the miner
will claim it's not mining and early out since m_stop is
set. This will cause the database and other things to get
shutdown. If the miner happens to find a block at that time,
it will try to call core, and crash.

Instead, lock and check whether any threads are currently
in m_threads, since they'll only be cleared once the threads
are joined. Moreover, since we lock, the second thread will
have to wait for the first one to have finished. Calling
join twice on a thread seems fine as per pthread_join(3).
2019-03-14 16:59:08 +00:00
moneromooo-monero
59478c80dd
daemon: new mining_status command 2019-03-09 20:51:53 +00:00
binaryFate
1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero
23abe60705
check load_t_from_json return values 2019-03-04 22:38:06 +00:00
moneromooo-monero
8298f42e9d
miner: it can now autodetect the optimal number of threads 2019-02-23 12:22:32 +00:00
Riccardo Spagni
e7d30780de
Merge pull request #4869
60f36386 Avoid unnecessary temp block and copy ctor (moneromooo-monero)
2018-12-04 17:12:47 +02:00
moneromooo-monero
60f36386e4
Avoid unnecessary temp block and copy ctor
block already has a default ctor, and the extra object
churn due to its innards (vectors, etc) is pointless.
2018-11-19 17:57:17 +00:00
Martijn Otto
bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
moneromooo-monero
3bb4b0d41f
miner: fix build with boost 1.69 2018-10-22 22:17:15 +00:00
moneromooo-monero
6ca00b6d75
miner: really reset flags/precision on std::cout 2018-10-08 12:12:36 +00:00
Riccardo Spagni
effcbf2060
Merge pull request #4459
bcf3f6af fuzz_tests: catch unhandled exceptions (moneromooo-monero)
3ebd05d4 miner: restore stream flags after changing them (moneromooo-monero)
a093092e levin_protocol_handler_async: do not propagate exception through dtor (moneromooo-monero)
1eebb82b net_helper: do not propagate exceptions through dtor (moneromooo-monero)
fb6a3630 miner: do not propagate exceptions through dtor (moneromooo-monero)
2e2139ff epee: do not propagate exception through dtor (moneromooo-monero)
0749a8bd db_lmdb: do not propagate exceptions in dtor (moneromooo-monero)
1b0afeeb wallet_rpc_server: exit cleanly on unhandled exceptions (moneromooo-monero)
418a9936 unit_tests: catch unhandled exceptions (moneromooo-monero)
ea7f9543 threadpool: do not propagate exceptions through the dtor (moneromooo-monero)
6e855422 gen_multisig: nice exit on unhandled exception (moneromooo-monero)
53df2deb db_lmdb: catch error in mdb_stat calls during migration (moneromooo-monero)
e67016dd blockchain_blackball: catch failure to commit db transaction (moneromooo-monero)
661439f4 mlog: don't remove old logs if we failed to rename the current file (moneromooo-monero)
5fdcda50 easylogging++: test for NULL before dereference (moneromooo-monero)
7ece1550 performance_test: fix bad last argument calling add_arg (moneromooo-monero)
a085da32 unit_tests: add check for page size > 0 before dividing (moneromooo-monero)
d8b1ec8b unit_tests: use std::shared_ptr to shut coverity up about leaks (moneromooo-monero)
02563bf4 simplewallet: top level exception catcher to print nicer messages (moneromooo-monero)
c57a65b2 blockchain_blackball: fix shift range for 32 bit archs (moneromooo-monero)
2018-09-29 22:20:38 +02:00
luigi1111
3235abc184
Merge pull request #4030
0c41488 miner: show id and height when a block is found (stoffu)
2018-07-19 13:53:36 -05:00
stoffu
0c4148845b
miner: show id and height when a block is found 2018-06-20 12:08:40 +09:00
cryptochangements34
6f9260e38e handle optional miner params better 2018-05-06 12:28:57 -04:00
Dimitris Apostolou
57c0b1ed9f Fix typos in various files 2018-03-15 18:25:38 +02:00
Riccardo Spagni
4f93f74528
Merge pull request #3277
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)
2018-03-05 19:11:20 +02:00
Edward Betts
fbcc91c2a4 Correct spelling mistakes. 2018-03-05 17:00:40 +00:00
stoffu
af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
Riccardo Spagni
ff36fd93fd
Merge pull request #3255
3962bcb2 Closes #2886: really ignore battery checking (Timothy D. Prime)
2018-02-20 17:47:03 +02:00
Timothy D. Prime
3962bcb2a2 Closes #2886: really ignore battery checking
Move option test first.
2018-02-12 10:29:22 -08:00
moneromooo-monero
bece67f9e8
miner: restore std::cout precision after modification
Coverity 136462
2018-02-02 15:15:21 +00:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero
09ce03d612
move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
Vasil Dimov
47c0948ab0
Implement missing miner functions on FreeBSD
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.
2017-11-11 16:27:19 +02:00
Vasil Dimov
fdb5bd161d
Remove unused variables and fix typos in comments 2017-11-11 16:17:19 +02:00
Riccardo Spagni
e50bf5f811
Merge pull request #2597
c4136134 miner: always update block template when starting (moneromooo-monero)
2017-10-15 18:47:43 +02:00
moneromooo-monero
c413613416
miner: always update block template when starting
This fixes using the previous address when starting mining,
then stopping and restarting with a different address
2017-10-07 11:32:36 +01:00
kenshi84
53ad5a0f42
Subaddresses 2017-10-07 13:06:21 +09:00
Guillaume LE VAILLANT
20256b7c04 Fix AC power supply detection on Linux
The /sys/class/power_supply/*/present file usually does not exist for
AC power supplies.
2017-09-08 11:07:56 +02:00
Riccardo Spagni
7b14a96c03
Merge pull request #2283
d1f204d6 miner: set thread name before logging (moneromooo-monero)
2017-08-15 20:54:53 +02:00
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
moneromooo-monero
d1f204d640
miner: set thread name before logging 2017-08-12 09:07:40 +01: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