From cadab16cdbeb98caae7190eb403c0c99f8ae795a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 28 Feb 2021 09:40:59 -0500 Subject: [PATCH] Revert "Shitty VPS limiting disk i/o should not crash a full node..." This reverts commit c90323865a7b30f93c750a0747b23f6fe85933b1. Turns out this is a bad idea. --- src/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c37b704ba..286ef28b0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6740,12 +6740,16 @@ void static ProcessGetData(CNode* pfrom) } // Pruned nodes may have deleted the block, so check whether // it's available before trying to send. - if (send && (mi->second->nStatus & BLOCK_HAVE_DATA)) { + if (send && (mi->second->nStatus & BLOCK_HAVE_DATA)) + { // Send block from disk CBlock block; - if (!ReadBlockFromDisk(block, (*mi).second,1)) { - fprintf(stderr,"Cannot load block from disk, disk I/O may be limited by VPS or failing hard drive..."); - } else { + if (!ReadBlockFromDisk(block, (*mi).second,1)) + { + assert(!"cannot load block from disk"); + } + else + { if (inv.type == MSG_BLOCK) { //uint256 hash; int32_t z;