diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-06-26 17:19:31 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-07-07 10:08:49 +0200 |
commit | 6ad0328f1c3e145d3224197eafd0f66b17cc1a1c (patch) | |
tree | 882c1e7bb5c90609063a05e642b4efb8cf2c1660 /src/bench/block_assemble.cpp | |
parent | 0212187fc624ea4a02fc99bc57ebd413499a9ee1 (diff) |
Don't assert(foo()) where foo has side effects
Diffstat (limited to 'src/bench/block_assemble.cpp')
-rw-r--r-- | src/bench/block_assemble.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp index 36fa175a76..2bd67654ab 100644 --- a/src/bench/block_assemble.cpp +++ b/src/bench/block_assemble.cpp @@ -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)}; |