aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-04-20 03:19:20 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-05-09 16:44:59 +0200
commitdf9eb5e14fa8072bc8a82b59e712c2ba36f13f4c (patch)
tree64c961273c28988b9be4138490e6db570a3b66d0 /src/miner.cpp
parenta7031507e647da0723bf289dadba10ef1a50f278 (diff)
Move {Get,Set}Compact from bignum to uint256
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index 01fc56601b..50be4fad40 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -466,7 +466,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
{
uint256 hash = pblock->GetHash();
- uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+ uint256 hashTarget = uint256().SetCompact(pblock->nBits);
if (hash > hashTarget)
return false;
@@ -552,7 +552,7 @@ void static BitcoinMiner(CWallet *pwallet)
// Search
//
int64_t nStart = GetTime();
- uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+ uint256 hashTarget = uint256().SetCompact(pblock->nBits);
uint256 hashbuf[2];
uint256& hash = *alignup<16>(hashbuf);
while (true)
@@ -636,7 +636,7 @@ void static BitcoinMiner(CWallet *pwallet)
{
// Changing pblock->nTime can change work required on testnet:
nBlockBits = ByteReverse(pblock->nBits);
- hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+ hashTarget.SetCompact(pblock->nBits);
}
}
} }