@@ -1949,8 +1949,7 @@ bool PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidati
19491949 return true ;
19501950 // Conflicting (but not necessarily invalid) data or different policy:
19511951 case BlockValidationResult::BLOCK_MISSING_PREV:
1952- // TODO: Handle this much more gracefully (10 DoS points is super arbitrary)
1953- if (peer) Misbehaving (*peer, 10 , message);
1952+ if (peer) Misbehaving (*peer, 100 , message);
19541953 return true ;
19551954 case BlockValidationResult::BLOCK_RECENT_CONSENSUS_CHANGE:
19561955 case BlockValidationResult::BLOCK_TIME_FUTURE:
@@ -2690,7 +2689,7 @@ bool PeerManagerImpl::CheckHeadersPoW(const std::vector<CBlockHeader>& headers,
26902689
26912690 // Are these headers connected to each other?
26922691 if (!CheckHeadersAreContinuous (headers)) {
2693- Misbehaving (peer, 20 , " non-continuous headers sequence" );
2692+ Misbehaving (peer, 100 , " non-continuous headers sequence" );
26942693 return false ;
26952694 }
26962695 return true ;
@@ -4107,7 +4106,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
41074106
41084107 if (vAddr.size () > MAX_ADDR_TO_SEND)
41094108 {
4110- Misbehaving (*peer, 20 , strprintf (" %s message size = %u" , msg_type, vAddr.size ()));
4109+ Misbehaving (*peer, 100 , strprintf (" %s message size = %u" , msg_type, vAddr.size ()));
41114110 return ;
41124111 }
41134112
@@ -4189,7 +4188,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
41894188 vRecv >> vInv;
41904189 if (vInv.size () > MAX_INV_SZ)
41914190 {
4192- Misbehaving (*peer, 20 , strprintf (" inv message size = %u" , vInv.size ()));
4191+ Misbehaving (*peer, 100 , strprintf (" inv message size = %u" , vInv.size ()));
41934192 return ;
41944193 }
41954194
@@ -4281,7 +4280,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
42814280 vRecv >> vInv;
42824281 if (vInv.size () > MAX_INV_SZ)
42834282 {
4284- Misbehaving (*peer, 20 , strprintf (" getdata message size = %u" , vInv.size ()));
4283+ Misbehaving (*peer, 100 , strprintf (" getdata message size = %u" , vInv.size ()));
42854284 return ;
42864285 }
42874286
@@ -4966,7 +4965,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
49664965 // Bypass the normal CBlock deserialization, as we don't want to risk deserializing 2000 full blocks.
49674966 unsigned int nCount = ReadCompactSize (vRecv);
49684967 if (nCount > MAX_HEADERS_RESULTS) {
4969- Misbehaving (*peer, 20 , strprintf (" headers message size = %u" , nCount));
4968+ Misbehaving (*peer, 100 , strprintf (" headers message size = %u" , nCount));
49704969 return ;
49714970 }
49724971 headers.resize (nCount);
0 commit comments