loosen up on dropped rpcs

This commit is contained in:
Christien Rioux 2023-07-15 20:03:58 -04:00
parent 3264b568d0
commit 21ecd64ff8

View File

@ -1470,7 +1470,9 @@ impl RPCProcessor {
Ok(v) => v,
Err(e) => {
// Punish nodes that send direct undecodable crap
address_filter.punish_node_id(sender_node_id);
if matches!(e, RPCError::Protocol(_) | RPCError::InvalidFormat(_)) {
address_filter.punish_node_id(sender_node_id);
}
return Ok(NetworkResult::invalid_message(e));
}
};