From 4a48a0671d2e02ba2a86af98282a452f23546b9e Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 4 Jun 2014 12:27:44 +0200 Subject: [PATCH] Remove side effect in assertion in ProcessGetData A side-effect was introduced into an assertion in 7a0e84d. This commit fixes that. --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 30fa9c6d70..e71d2d0cbc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3390,7 +3390,8 @@ void static ProcessGetData(CNode* pfrom) { // Send block from disk CBlock block; - assert(ReadBlockFromDisk(block, (*mi).second)); + if (!ReadBlockFromDisk(block, (*mi).second)) + assert(!"cannot load block from disk"); if (inv.type == MSG_BLOCK) pfrom->PushMessage("block", block); else // MSG_FILTERED_BLOCK)