count unsigned repair requests (#27953)

This commit is contained in:
Jeff Biseda 2022-09-24 12:56:02 -07:00 committed by GitHub
parent 45e26574f3
commit 8b43215ddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -151,6 +151,7 @@ impl RequestResponse for AncestorHashesRepairType {
#[derive(Default)]
struct ServeRepairStats {
total_requests: usize,
unsigned_requests: usize,
dropped_requests: usize,
total_dropped_response_packets: usize,
total_response_packets: usize,
@ -500,6 +501,7 @@ impl ServeRepair {
datapoint_info!(
"serve_repair-requests_received",
("total_requests", stats.total_requests, i64),
("unsigned_requests", stats.unsigned_requests, i64),
("dropped_requests", stats.dropped_requests, i64),
(
"total_dropped_response_packets",
@ -675,6 +677,8 @@ impl ServeRepair {
if request.supports_signature() {
// collect stats for signature verification
Self::verify_signed_packet(&my_id, packet, &request, stats);
} else {
stats.unsigned_requests += 1;
}
let from_addr = packet.meta.socket_addr();