From 3a1636517a82ec9b939c7ca80451891467fc9315 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Tue, 14 Apr 2015 15:37:00 +0300 Subject: [PATCH] Normalize the case to prevent duplication of valid shares by the client --- lib/template_registry.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lib/template_registry.py b/lib/template_registry.py index e367d73..db2c923 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 = 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)" % \ -- 1.7.1