Skip to content

Commit

Permalink
test: correct blockencodings_tests
Browse files Browse the repository at this point in the history
since digibyte has moved to an alternate multi-pow hashing function,
the original test fails due to a bad memory access.
  • Loading branch information
barrystyle committed Mar 13, 2021
1 parent 82414be commit 43929b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/blockencodings_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static CBlock BuildBlockTestCase() {
bool mutated;
block.hashMerkleRoot = BlockMerkleRoot(block, &mutated);
assert(!mutated);
while (!CheckProofOfWork(block.GetHash(), block.nBits, Params().GetConsensus())) ++block.nNonce;
while (!CheckProofOfWork(block.GetPoWAlgoHash(Params().GetConsensus()), block.nBits, Params().GetConsensus())) ++block.nNonce;
return block;
}

Expand Down Expand Up @@ -297,7 +297,7 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
bool mutated;
block.hashMerkleRoot = BlockMerkleRoot(block, &mutated);
assert(!mutated);
while (!CheckProofOfWork(block.GetHash(), block.nBits, Params().GetConsensus())) ++block.nNonce;
while (!CheckProofOfWork(block.GetPoWAlgoHash(Params().GetConsensus()), block.nBits, Params().GetConsensus())) ++block.nNonce;

// Test simple header round-trip with only coinbase
{
Expand Down

0 comments on commit 43929b5

Please sign in to comment.