Permalink
Browse files

Normalize the case to prevent duplication of valid shares by the client

  • Loading branch information...
CryptoManiac committed Apr 14, 2015
1 parent 1ea0894 commit 3a1636517a82ec9b939c7ca80451891467fc9315
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/template_registry.py
View
@@ -192,7 +192,12 @@ def submit_share(self, job_id, worker_name, session, extranonce1_bin, extranonce
# Check nonce
if len(nonce) != 8:
raise SubmitException("Incorrect size of nonce. Expected 8 chars")
# normalize the case to prevent duplication of valid shares by the client
ntime = ntile.lower()
nonce = nonce.lower()
extranonce2 = extranonce2.lower()
# Check for duplicated submit
if not job.register_submit(extranonce1_bin, extranonce2, ntime, nonce):
log.info("Duplicate from %s, (%s %s %s %s)" % \

0 comments on commit 3a16365

Please sign in to comment.