aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-05-09 16:57:06 +0200
committerWladimir J. van der Laan <[email protected]>2014-05-09 17:03:51 +0200
commit8bcfccbc2de25e3b40d1c222d7c5d9991345a0aa (patch)
treeec29908109f159efce4c7ccb6bba68125b1d04e8 /src/miner.cpp
parentMerge pull request #4134 (diff)
parentDeduplicate uint* comparison operator logic (diff)
downloaddiscoin-8bcfccbc2de25e3b40d1c222d7c5d9991345a0aa.tar.xz
discoin-8bcfccbc2de25e3b40d1c222d7c5d9991345a0aa.zip
Merge pull request #4076
397668e Deduplicate uint* comparison operator logic (Pieter Wuille) df9eb5e Move {Get,Set}Compact from bignum to uint256 (Pieter Wuille) a703150 Add multiplication and division to uint160/uint256 (Pieter Wuille) 4d480c8 Exception instead of assigning 0 in case of wrong vector length (Pieter Wuille) eb2cbd7 Deduplicate shared code between uint160 and uint256 (Pieter Wuille)
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 01fc56601..50be4fad4 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);
}
}
} }