Also squashed:
config: add log messages to set_algo() and set_nfactor().
algorithm: use set_algorithm_nfactor() when setting default nfactor in set_algorithm().
Otherwise algorithm->n defaults to 0.
P.S. Did I already mention how this could have been C++?..
Had two bugs:
1. Will not compile due to unknown algorithm_t size.
2. nfactor is set to 0 (bad calling, fix later).
So squashed two commits:
1. algorithm: move algorithm_t definition to header.
2. config: if --nfactor is specified, properly set algorithm->nfactor.
Doc in `doc/configuration.md` (has to be started sometime, no?).
Configuration function has to be lamely-named set_algo(), because
set_algorithm() is already declared in algorithm.h (prevent namespace
conflict).
algorithm has to be added as global variable due to the way the
callback is done (by CCAN/opt, which in itself is nice).
This can be cleaned up significantly by (at least) introducing a
global configuration struct, but there is no reason to do it now
just for this - better a wholesale manana.
Current help contains conflict statements regarding intensity
priorities.
Per commit d11df698d141988491494aa1f29c7d3595e9712b:
- rawintensity overrides both xintensity and intensity
- xintensity overrides intensity
The config file is written poorly: first off, not all available options
are written (they have to be written manually, since there's no struct
enumeration); then, default values are not commented out.
Pool state machine is incomplete, and enabled_pools is not increased if
pool state is not explicitly set to "enabled" in config. However,
there is no reason why the user should not be allowed to disable
all pools.
enabled_pools is a bookkeeping variable, and bookkeeping is cumbersome.
Rather than trying to fix this regression, get rid of another place
where enabled_pools is used.
Closes https://github.com/veox/sgminer/issues/75
Previous defaults (before 10/30) were optimised for Bitcoin that has
a much higher average block time. Optimise for Litecoin (currently
largest scrypt network.)
Not pushing it further down so as not to scare people with dropping
hashrates.
Thanks to MissedOutOnBTC @ freenode for testing.
Closes https://github.com/veox/sgminer/issues/22
Closes https://github.com/veox/sgminer/issues/51
Using j_a_i allows us to get rid of accounting vars like total_poolnames,
and pool names don't get mixed up if they're not specified for some pools.
It would still be desirable to show the URL as a pool name if poolname is not
set.