Don't assert(foo()) where foo has side effects

This commit is contained in:
practicalswift
2018-06-26 17:19:31 +02:00
parent 0212187fc6
commit 6ad0328f1c
5 changed files with 14 additions and 8 deletions

View File

@@ -41,7 +41,8 @@ static CTxIn MineBlock(const CScript& coinbase_scriptPubKey)
auto block = PrepareBlock(coinbase_scriptPubKey);
while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
assert(++block->nNonce);
++block->nNonce;
assert(block->nNonce);
}
bool processed{ProcessNewBlock(Params(), block, true, nullptr)};