main.c


Log

Author Commit Date CI Message
Con Kolivas 1b235517 2011-07-07T10:04:37 Merge branch 'cgminer' into mfontani Conflicts: main.c
Con Kolivas ed233e8c 2011-07-07T09:58:26 Put work into a staging area which makes it possible to check the latest work data received. Then check the latest work data against a store of the current_block and use it to determine if we have moved to a new block. This makes --no-longpoll work just as efficiently as longpoll, and works around when longpoll is unreliable.
Marco Fontani c815de49 2011-07-05T08:29:13 Add "efficiency" and "utility" Efficiency is the percentage of getworks compared to the amount of work requested from the pool. It can go higher than 100% in case more shares than getworks were found. Some pools prefer miners to have a high efficiency; CPU miners likely exhibit a low efficiency. Utility is the number of shares found per minute, since the miner was started. It is another way to describe the effectiveness of a miner.
Rusty Russell efebee5a 2011-07-06T16:47:29 Fix the case where there are no GPUs, and exit if they give errors. If there are no GPUs, set nDevs to 0 not -1 (status is set to an unhelpful -1001 here on my laptop, so we can't rely on a particular status value). Also, if nDevs is -1, exit rather than screwing up later.
Rusty Russell 8b68dc44 2011-07-06T16:47:29 Fix --ndevs/-n option. The option should be called from within the callback, and just use printf to give the raw result, rather than using applog which prepends a timestamp.
Rusty Russell 8d25df3c 2011-07-06T16:47:29 Cleanup --cpu-threads/-t logic Currently it gets negated which means the default printed is wrong. Use an explicit flag to tell if the user has overridden it; if they haven't, and they turn off the GPUs, reset it to num_processors.
Rusty Russell 3e818121 2011-07-06T16:47:29 Use ccan/opt for commandline parsing. This cleans up option handling, by using ccan/opt rather than handcoded getopt_long. We still have to open-code some things, such as json config file handling. The main change is that the --config option causes a file to be parsed during commandline parsing, so you can override the results, and provide multiple of them. Other improvements are that 'help' and 'ndevs' are not valid arguments in the config file; we use a separate argument table for such commandline-only flags.
Con Kolivas 5969d65a 2011-07-06T15:57:50 First work for each thread is now queued in advance.
Con Kolivas e9a397d4 2011-07-06T15:56:30 More space to wipe old text.
Con Kolivas e9906980 2011-07-06T15:40:12 Fix the extra work queued every longpoll by queueing it all in the beginning.
Con Kolivas 719deb3a 2011-07-06T14:20:18 Create a wakeup thread that keeps the hashmeter going in case the mining threads all stall.
Con Kolivas ddae5aa9 2011-07-06T13:29:01 Remove unused variable.
Con Kolivas 837e7b1a 2011-07-06T13:28:29 Remove unused cgpu rolling_local variable.
Con Kolivas 93800e57 2011-07-06T13:19:56 More output tidy.
Con Kolivas 56eee5f0 2011-07-06T13:16:47 Retry should get_work() fail for whatever reason.
Con Kolivas 07f6de8b 2011-07-06T13:05:57 Change ifdef order since batch is always defined if idle is.
Con Kolivas cf1e4627 2011-07-06T13:04:35 Give error messages at all points of failure.
Con Kolivas ed7e5bf9 2011-07-06T12:51:12 There is still potential for an uneven number of queued and dropped work items with this unnecessarily complex check. Flush work guarantees a symmetrical number of queue and discard already.
Con Kolivas 69d8df64 2011-07-06T08:59:51 More cleaning of output with detecting new block.
Con Kolivas 8333a2ff 2011-07-06T00:01:40 Improve output appearance +/- verbose mode.
Con Kolivas 1fb09eaa 2011-07-05T23:11:05 Implement -n/--ndevs option.
Con Kolivas 0ebdc39a 2011-07-05T23:07:18 Make debug mode imply verbose mode.
Con Kolivas 413e6b86 2011-07-05T22:08:13 Fix potential divide by zero.
Con Kolivas 0a80d4b0 2011-07-05T22:04:54 Display the output as a refreshing line and only push continuous log to stderr if desired.
Con Kolivas a93b22c6 2011-07-05T17:34:54 Make it possible to build without GPU mining by picking up HAVE_OPENCL from config.h.
Con Kolivas 4172fec2 2011-07-05T16:47:19 Cope with invalid parameter passing.
Con Kolivas bc7cde7b 2011-07-05T16:37:51 Implement short option parsing.
Con Kolivas 13c57a57 2011-07-05T15:18:13 Properly initialise qd_lock mutex.
Con Kolivas f90e73af 2011-07-05T10:47:47 Queue and pop precisely the same amount of work in flush_request to ensure all work is cleared and there isn't an uneven add/remove possible.
Con Kolivas af6e7937 2011-07-05T10:42:11 Signal handling in dns lookup code is responsible for libcurl crashes when multithreading. Disable signal handling and use many curl handles instead, thus making work more asynchronous. Theoretically a curl can wait forever on a dns lookup with this but it's extremely unlikely.
Con Kolivas 91f9c527 2011-07-04T20:33:31 Rename code and application binary to cgminer version 1.0.9 preempting version 1.1.0, moving main code to main.c.