git://git.novaco.in
/
stratum-mining.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1ea0894
)
Normalize the case to prevent duplication of valid shares by the client
author
CryptoManiac
<balthazar@yandex.ru>
Tue, 14 Apr 2015 12:37:00 +0000 (15:37 +0300)
committer
CryptoManiac
<balthazar@yandex.ru>
Tue, 14 Apr 2015 12:37:00 +0000 (15:37 +0300)
lib/template_registry.py
patch
|
blob
|
history
diff --git
a/lib/template_registry.py
b/lib/template_registry.py
index
e367d73
..
db2c923
100644
(file)
--- 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)" % \