Commit ec8501a79cd8018a91c108fb65ab89402223dc19

Con Kolivas 2012-01-05T21:45:46

Should the donation pool fail, don't make the fallover pool behave as though the primary pool is lagging.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/main.c b/main.c
index 4958efb..4c5cc21 100644
--- a/main.c
+++ b/main.c
@@ -2425,9 +2425,12 @@ static inline struct pool *select_pool(bool lagging)
 	static int rotating_pool = 0;
 	struct pool *pool, *cp;
 
-	if (!lagging && total_getworks && opt_donation > 0.0 && !donationpool.idle &&
-	   (float)donationpool.getwork_requested / (float)total_getworks < opt_donation / 100)
-		return &donationpool;
+	if (total_getworks && opt_donation > 0.0 && !donationpool.idle &&
+	   (float)donationpool.getwork_requested / (float)total_getworks < opt_donation / 100) {
+		if (!lagging)
+			return &donationpool;
+		lagging = false;
+	}
 
 	cp = current_pool();