Browse Source

Ignore CMPCTBLOCK messages for pruned blocks

Also ignores CMPCTBLOCK announcements that have too little work.  This is to
prevent disk-exhaustion DoS.
0.14
Suhas Daftuar 8 years ago
parent
commit
1d06e49834
  1. 2
      src/main.cpp

2
src/main.cpp

@ -5626,8 +5626,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, @@ -5626,8 +5626,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

Loading…
Cancel
Save