Browse Source

Tidy up job submissions check

pool
Sammy Libre 8 years ago
parent
commit
336a7c92c9
  1. 3
      go-pool/stratum/miner.go

3
go-pool/stratum/miner.go

@ -41,8 +41,7 @@ type Miner struct { @@ -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{}{}

Loading…
Cancel
Save