Browse Source

Remove redundant comment and there is no point capping shares to 5xdiff

master
Con Kolivas 11 years ago
parent
commit
9b95920ab5
  1. 10
      src/stratifier.c

10
src/stratifier.c

@ -816,12 +816,10 @@ static void stratum_broadcast_message(const char *msg)
stratum_broadcast(json_msg); stratum_broadcast(json_msg);
} }
/* FIXME: This is all a simple workaround till we use a proper database. It /* FIXME: This is all a simple workaround till we use a proper database. */
* does not account for users who have shelved shares but have not mined since
* the pool's restart ! */
static void block_solve(ckpool_t *ckp) static void block_solve(ckpool_t *ckp)
{ {
double total = 0, retain = 0, window, max_window; double total = 0, retain = 0, window;
user_instance_t *instance, *tmp; user_instance_t *instance, *tmp;
char *msg; char *msg;
@ -829,8 +827,6 @@ static void block_solve(ckpool_t *ckp)
window = current_workbase->network_diff; window = current_workbase->network_diff;
ck_runlock(&workbase_lock); ck_runlock(&workbase_lock);
max_window = window * 5;
LOGWARNING("Block solve user summary"); LOGWARNING("Block solve user summary");
ck_rlock(&instance_lock); ck_rlock(&instance_lock);
@ -841,8 +837,6 @@ static void block_solve(ckpool_t *ckp)
/* What proportion of shares should each user retain */ /* What proportion of shares should each user retain */
if (total > window) if (total > window)
retain = (total - window) / total; retain = (total - window) / total;
if (total > max_window)
retain *= (max_window / total);
HASH_ITER(hh, user_instances, instance, tmp) { HASH_ITER(hh, user_instances, instance, tmp) {
double residual, shares; double residual, shares;

Loading…
Cancel
Save