Browse Source

Skip trying to submit shares in benchmark mode

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

+ 7 - 0
miner.c

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