1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 14:28:12 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Noel Maersk
c6a27709f8 core: use global algorithm structure instead of opt_nfactor.
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++?..
2014-03-07 02:27:06 +02:00
Noel Maersk
a0c52bf67c config: introduce set_nfactor() and use it to call set_algorithm_nfactor().
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.
2014-03-07 02:27:06 +02:00
Noel Maersk
92b7770212 config: add --algorithm option and documentation.
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.
2014-03-07 02:27:00 +02:00
Noel Maersk
50a792f2cd algorithm: initial set_algorithm() and set_algorithm_nfactor(). 2014-03-06 21:23:13 +02:00
Noel Maersk
776eec2e11 algorithm: initial structure definition. 2014-03-06 21:23:10 +02:00