Added log message for share above 100k
authorslush <info@bitcoin.cz>
Sun, 9 Sep 2012 18:29:11 +0000 (20:29 +0200)
committerslush <info@bitcoin.cz>
Sun, 9 Sep 2012 18:29:11 +0000 (20:29 +0200)
lib/template_registry.py

index 4d3f061..5fc5124 100644 (file)
@@ -215,11 +215,15 @@ class TemplateRegistry(object):
         block_hash_hex = "%064x" % hash_int
         header_hex = binascii.hexlify(header_bin)
                  
-        target = self.diff_to_target(difficulty)
-        
-        if hash_int > target:
+        target_user = self.diff_to_target(difficulty)        
+        if hash_int > target_user:
             return (False, "Share is above target", None, None)
 
+        # Mostly for debugging purposes
+        target_info = self.diff_to_target(100000)
+        if hash_int <= target_info:
+            log.info("Yay, share with diff above 100000")
+
         # 5. Compare hash with target of the network        
         if hash_int <= job.target:
             # Yay! It is block candidate!