mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 16:53:52 +02:00
Don't assert(foo()) where foo has side effects
This commit is contained in:
@@ -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)};
|
||||
|
||||
Reference in New Issue
Block a user