Browse Source

Add last share's pool info in cgpu_info

Kano 14 years ago
parent
commit
0ebc0c9d8a
2 changed files with 4 additions and 0 deletions
  1. 2 0
      cgminer.c
  2. 2 0
      miner.h

+ 2 - 0
cgminer.c

@@ -1422,6 +1422,8 @@ static bool submit_upstream_work(const struct work *work)
 		cgpu->accepted++;
 		total_accepted++;
 		pool->accepted++;
+		cgpu->last_share_pool = pool->pool_no;
+		cgpu->last_share_pool_time = time(NULL);
 		if (opt_debug)
 			applog(LOG_DEBUG, "PROOF OF WORK RESULT: true (yay!!!)");
 		if (!QUIET) {

+ 2 - 0
miner.h

@@ -292,6 +292,8 @@ struct cgpu_info {
 	int gpu_powertune;
 	float gpu_vddc;
 #endif
+	int last_share_pool;
+	time_t last_share_pool_time;
 };
 
 #ifndef WIN32