Bitcoin Forum
November 13, 2024, 02:55:25 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How To calculate Difficulty from mining.set_difficulty response from pool?  (Read 143 times)
shaz_lokh (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
July 26, 2019, 06:05:52 PM
 #1

Hello,

I am trying to make miner for keccak based coins such as Maxcoin and smartcash coin.

when i get response from pool in mining.set_difficulty
lets say for example difficulty = 128

formula to calculate target in python
ptarget = int(0x00ffff * 2** (8*(0x1e - 3)) / mining_set_difficulty_value)
pool_target = '%064x' %ptarget

please let me know, if i doing something wrong in it

Thanks and regards
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!