Permalink
Browse files

fix compile error on CheckProofOfWork function in tests

  • Loading branch information...
ander7agar committed Aug 11, 2017
1 parent d8c30d6 commit 76ff1a758ac9df48047f59badba4f68cea9997e1
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/test/blockencodings_tests.cpp
  2. +1 −1 src/test/test_bitcoin.cpp
@@ -49,7 +49,7 @@ static CBlock BuildBlockTestCase() {
bool mutated;
block.hashMerkleRoot = BlockMerkleRoot(block, &mutated);
assert(!mutated);
while (!CheckProofOfWork(block.GetPoWHash(), block.nBits, block.nTime, Params().GetConsensus())) ++block.nNonce;
while (!CheckProofOfWork(block, block.nBits, Params().GetConsensus())) ++block.nNonce;
return block;
}
@@ -299,7 +299,7 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
bool mutated;
block.hashMerkleRoot = BlockMerkleRoot(block, &mutated);
assert(!mutated);
while (!CheckProofOfWork(block.GetPoWHash(), block.nBits, block.nTime, Params().GetConsensus())) ++block.nNonce;
while (!CheckProofOfWork(block, block.nBits, block.nTime, Params().GetConsensus())) ++block.nNonce;
// Test simple header round-trip with only coinbase
{
@@ -131,7 +131,7 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
unsigned int extraNonce = 0;
IncrementExtraNonce(&block, chainActive.Tip(), extraNonce);
while (!CheckProofOfWork(block.GetPoWHash(), block.nBits, block.nTime, chainparams.GetConsensus())) ++block.nNonce;
while (!CheckProofOfWork(block, block.nBits, chainparams.GetConsensus())) ++block.nNonce;
std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block);

0 comments on commit 76ff1a7

Please sign in to comment.