コード例 #1
0
ファイル: jobs.py プロジェクト: HashFast/hashfast-tools
 def set_difficulty(self, new_difficulty):
     if self.scrypt_target:
         dif1 = 0x0000ffff00000000000000000000000000000000000000000000000000000000
     else:
         dif1 = 0x00000000ffff0000000000000000000000000000000000000000000000000000
     self.target = int(dif1 / new_difficulty)
     self.target_hex = binascii.hexlify(utils.uint256_to_str(self.target))
     self.difficulty = new_difficulty
コード例 #2
0
ファイル: jobs.py プロジェクト: ziyaad30/stratum-proxy-ng
 def set_difficulty(self, new_difficulty):
     if self.scrypt_target:
         dif1 = 0x0000ffff00000000000000000000000000000000000000000000000000000000
     else:
         dif1 = 0x00000000ffff0000000000000000000000000000000000000000000000000000
     self.target = int(dif1 / new_difficulty)
     self.target_hex = binascii.hexlify(utils.uint256_to_str(self.target))
     self.difficulty = new_difficulty
コード例 #3
0
 def set_difficulty(self, new_difficulty):
     dif1 = utils.getMT()
     self.target = int(dif1 / new_difficulty)
     self.target_hex = binascii.hexlify(utils.uint256_to_str(self.target))
     self.difficulty = new_difficulty
コード例 #4
0
ファイル: jobs.py プロジェクト: FireWalkerX/AlcheMist
 def set_difficulty(self, new_difficulty):
     dif1 = utils.getMT() 
     self.target = int(dif1 / new_difficulty)
     self.target_hex = binascii.hexlify(utils.uint256_to_str(self.target))
     self.difficulty = new_difficulty
コード例 #5
0
 def set_difficulty(self, new_difficulty):
     dif1 = 0x00000000ffff0000000000000000000000000000000000000000000000000000
     self.target = int(dif1 / new_difficulty)
     self.target_bin = utils.uint256_to_str(self.target)
     self.difficulty = new_difficulty
コード例 #6
0
 def set_difficulty(self, new_difficulty):
     dif1 = 0x00000000ffff0000000000000000000000000000000000000000000000000000
     self.target = int(dif1 / new_difficulty)
     self.target_bin = utils.uint256_to_str(self.target)
     self.difficulty = new_difficulty