X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=lib%2Ftemplate_registry.py;h=25dad09b45fc843ad1a9f757906c92ded0fb7881;hb=8249d473be2ba0ff109736ff7f87fad871332315;hp=e367d73428152e4b3001c0b40d2bc4b3fcea0391;hpb=adec2324c5f5a612a864453b7cd2cb5f17c5cfa8;p=stratum-mining.git diff --git a/lib/template_registry.py b/lib/template_registry.py index e367d73..25dad09 100644 --- a/lib/template_registry.py +++ b/lib/template_registry.py @@ -192,7 +192,12 @@ class TemplateRegistry(object): # 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 = ntime.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)" % \