1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

Fixed problem with invalid stratum difficulty for Quark, AnimeCoin and QubitCoin.

This commit is contained in:
phm 2014-03-22 14:16:49 +01:00
parent a0c0975bb8
commit 21d928b543

4
util.c
View File

@ -45,6 +45,8 @@
#include "util.h"
#define DEFAULT_SOCKWAIT 60
#define DM_SELECT(x, y, z) (dm_mode == DM_BITCOIN ? x : (dm_mode == DM_QUARKCOIN ? y : z))
extern enum diff_calc_mode dm_mode;
bool successful_connect = false;
static void keep_sockalive(SOCKETTYPE fd)
@ -1642,7 +1644,7 @@ static bool parse_diff(struct pool *pool, json_t *val)
{
double old_diff, diff;
diff = json_number_value(json_array_get(val, 0));
diff = json_number_value(json_array_get(val, 0)) * DM_SELECT(1, 256, 1);
if (diff == 0)
return false;