Bitcoin Forum
December 13, 2024, 03:10:50 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get proofOfWorkLimit?  (Read 1374 times)
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
April 19, 2014, 12:59:49 PM
 #1

Look at the code below from bitcoinj (core\src\main\java\com\google\bitcoin\params\MainNetParams.java):
Code:
proofOfWorkLimit = Utils.decodeCompactBits(0x1d00ffffL);
And look at the code from bitcoin qt wallet (src\main.cpp):
Code:
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 32);
I assume that in second case bnProofOfWorkLimit consists of 32 "0" and 224 "1" (000000...000000000011111111111111111111....11111111).
So I don't have an idea how to get first case "0x1d00ffff" from second case?
P.S. I have looked in "uint256.h". It wasn't helpful.
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!