Browse Source

Skip trying to submit shares in benchmark mode

Luke Dashjr 12 years ago
parent
commit
392614c646
1 changed files with 7 additions and 0 deletions
  1. 7 0
      miner.c

+ 7 - 0
miner.c

@@ -8863,6 +8863,12 @@ static
 void _submit_work_async(struct work *work)
 {
 	applog(LOG_DEBUG, "Pushing submit work to work thread");
+	
+	if (opt_benchmark)
+	{
+		free_work(work);
+		return;
+	}
 
 	mutex_lock(&submitting_lock);
 	++total_submitting;
@@ -11767,6 +11773,7 @@ begin_bench:
 	cgtime(&total_tv_start);
 	cgtime(&total_tv_end);
 
+	if (!opt_benchmark)
 	{
 		pthread_t submit_thread;
 		if (unlikely(pthread_create(&submit_thread, NULL, submit_work_thread, NULL)))