aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-04 12:27:44 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-04 16:02:04 +0200
commit4a48a0671d2e02ba2a86af98282a452f23546b9e (patch)
tree03379893de515bc7cef11f5d2927bbe85f0ef36f /src
parent358a61ee061f5cec53c62e8226872a2d02afdb0d (diff)
Remove side effect in assertion in ProcessGetData
A side-effect was introduced into an assertion in 7a0e84d. This commit fixes that.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
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)