Permalink
Browse files

Don't put curcial code in an assert() statement

  • Loading branch information...
zander committed Feb 17, 2017
1 parent a30e312 commit dfe6d3ae24690f536ba4bcfa62444a78e3599593
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main.cpp
View
@@ -2456,7 +2456,8 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
mapBlockSource.erase(pindexNew->GetBlockHash());
nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2;
LogPrint("bench", " - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001);
- assert(view.Flush());
+ bool flushed = view.Flush();
+ assert(flushed);
}
int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
LogPrint("bench", " - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);

0 comments on commit dfe6d3a

Please sign in to comment.