|
|
@ -264,7 +264,6 @@ struct stratum_instance { |
|
|
|
|
|
|
|
|
|
|
|
time_t last_txns; /* Last time this worker requested txn hashes */ |
|
|
|
time_t last_txns; /* Last time this worker requested txn hashes */ |
|
|
|
time_t disconnected_time; /* Time this instance disconnected */ |
|
|
|
time_t disconnected_time; /* Time this instance disconnected */ |
|
|
|
time_t died_time; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int64_t suggest_diff; /* Stratum client suggested diff */ |
|
|
|
int64_t suggest_diff; /* Stratum client suggested diff */ |
|
|
|
double best_diff; /* Best share found by this instance */ |
|
|
|
double best_diff; /* Best share found by this instance */ |
|
|
@ -917,7 +916,6 @@ static void update_base(ckpool_t *ckp, const int prio) |
|
|
|
|
|
|
|
|
|
|
|
static void __add_dead(sdata_t *sdata, stratum_instance_t *client) |
|
|
|
static void __add_dead(sdata_t *sdata, stratum_instance_t *client) |
|
|
|
{ |
|
|
|
{ |
|
|
|
client->died_time = time(NULL); |
|
|
|
|
|
|
|
DL_APPEND(sdata->dead_instances, client); |
|
|
|
DL_APPEND(sdata->dead_instances, client); |
|
|
|
sdata->stats.dead++; |
|
|
|
sdata->stats.dead++; |
|
|
|
sdata->dead_generated++; |
|
|
|
sdata->dead_generated++; |
|
|
@ -1450,8 +1448,6 @@ static void drop_client(sdata_t *sdata, const int64_t id) |
|
|
|
/* Cull old unused clients lazily when there are no more reference
|
|
|
|
/* Cull old unused clients lazily when there are no more reference
|
|
|
|
* counts for them. */ |
|
|
|
* counts for them. */ |
|
|
|
DL_FOREACH_SAFE(sdata->dead_instances, client, tmp) { |
|
|
|
DL_FOREACH_SAFE(sdata->dead_instances, client, tmp) { |
|
|
|
if (now_t - client->died_time < 60) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
if (unlikely(client->ref)) { |
|
|
|
if (unlikely(client->ref)) { |
|
|
|
deadref++; |
|
|
|
deadref++; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|