From 0e37fc24b0908c72d6b6c502cc6bc636fb12d6cf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Mar 2014 23:02:51 +0100 Subject: [PATCH] Added algorrithm name to "coin" API command. Changed default algo name to "scrypt". --- algorithm.c | 4 ++-- api.c | 2 +- sgminer.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/algorithm.c b/algorithm.c index 7399fe02..bafb1dcb 100644 --- a/algorithm.c +++ b/algorithm.c @@ -17,9 +17,9 @@ void set_algorithm(algorithm_t* algo, const char* newname) { algo->name[sizeof(algo->name) - 1] = '\0'; if (strcmp(algo->name, "adaptive-nfactor") == 0) { - set_algorithm_nfactor(algo, 11); + set_algorithm_nfactor(algo, 11); } else { - set_algorithm_nfactor(algo, 10); + set_algorithm_nfactor(algo, 10); } return; diff --git a/api.c b/api.c index 3b0cff47..e0274726 100644 --- a/api.c +++ b/api.c @@ -2856,7 +2856,7 @@ static void minecoin(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __may message(io_data, MSG_MINECOIN, 0, NULL, isjson); io_open = io_add(io_data, isjson ? COMSTR JSON_MINECOIN : _MINECOIN COMSTR); - root = api_add_const(root, "Hash Method", SCRYPTSTR, false); + root = api_add_string(root, "Hash Method", algorithm->name, false); cg_rlock(&ch_lock); root = api_add_timeval(root, "Current Block Time", &block_timeval, true); diff --git a/sgminer.c b/sgminer.c index f4a1790e..81b4cd5a 100644 --- a/sgminer.c +++ b/sgminer.c @@ -7853,7 +7853,7 @@ int main(int argc, char *argv[]) /* Default algorithm specified in algorithm.c ATM */ algorithm = (algorithm_t *)alloca(sizeof(algorithm_t)); - set_algorithm(algorithm, "default"); + set_algorithm(algorithm, "scrypt"); devcursor = 8; logstart = devcursor + 1;