From 1d06e49834814eed45e07393dcffd7b6683311b2 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 26 Jul 2016 16:52:35 -0400 Subject: [PATCH] Ignore CMPCTBLOCK messages for pruned blocks Also ignores CMPCTBLOCK announcements that have too little work. This is to prevent disk-exhaustion DoS. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 4675127ec..b41a71955 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5626,8 +5626,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, std::vector vInv(1); vInv[0] = CInv(MSG_BLOCK, cmpctblock.header.GetHash()); pfrom->PushMessage(NetMsgType::GETDATA, vInv); - return true; } + return true; } // If we're not close to tip yet, give up and let parallel block fetch work its magic