From 336a7c92c96cc195038f901f1339ce465986c963 Mon Sep 17 00:00:00 2001 From: Sammy Libre Date: Wed, 7 Dec 2016 12:02:38 +0500 Subject: [PATCH] Tidy up job submissions check --- go-pool/stratum/miner.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go-pool/stratum/miner.go b/go-pool/stratum/miner.go index 2d33348..c59d19d 100644 --- a/go-pool/stratum/miner.go +++ b/go-pool/stratum/miner.go @@ -41,8 +41,7 @@ type Miner struct { func (job *Job) submit(nonce string) bool { job.Lock() defer job.Unlock() - _, exist := job.submissions[nonce] - if exist { + if _, exist := job.submissions[nonce]; exist { return true } job.submissions[nonce] = struct{}{}