aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@chaincode.com>2016-07-26 16:50:48 -0400
committerWladimir J. van der Laan <laanwj@gmail.com>2016-07-29 08:27:57 +0200
commitb7e201181bcc0f6328e0a499803f1dbb2c2dbd28 (patch)
treebc8796f62d43cf296cd9ca651dee5f26e999043e
parent8360d5b37dd4d8248da0552de40e5ea1d17f51eb (diff)
downloadbitcoin-b7e201181bcc0f6328e0a499803f1dbb2c2dbd28.tar.xz
Prevent fingerprinting, disk-DoS with compact blocks
- Ignore GETBLOCKTXN requests for unknown blocks Don't disconnect peers, or else we leak information that could be used for fingerprinting. - Ignore CMPCTBLOCK messages for pruned blocks Also ignores CMPCTBLOCK announcements that have too little work. This is to prevent disk-exhaustion DoS. Github-Pull: #8408 Rebased-From: 1de2a46632946990a7863020b61172232f8c5796 1d06e49834814eed45e07393dcffd7b6683311b2
-rw-r--r--src/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 70f0a42475..a80eb62126 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5344,7 +5344,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
BlockMap::iterator it = mapBlockIndex.find(req.blockhash);
if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) {
- Misbehaving(pfrom->GetId(), 100);
LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id);
return true;
}
@@ -5628,8 +5627,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
std::vector<CInv> 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