From d4ab7f96f175315c8ed3bfd402e517dffd8aa8f3 Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Mon, 13 Jan 2020 15:19:47 +0000 Subject: [PATCH] Separated increasing packet count into explicit sent and received --- validator/src/validator/health_check/score.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/validator/src/validator/health_check/score.rs b/validator/src/validator/health_check/score.rs index 56d3098cc4..2f394120e2 100644 --- a/validator/src/validator/health_check/score.rs +++ b/validator/src/validator/health_check/score.rs @@ -37,13 +37,14 @@ impl NodeScore { } } - pub(crate) fn increase_packet_count(&mut self, was_delivered: bool) { + pub(crate) fn increase_sent_packet_count(&mut self) { self.packets_sent += 1; - if was_delivered { + } + + pub(crate) fn increase_received_packet_count(&mut self) { self.packets_received += 1; } } -} impl std::fmt::Display for NodeScore { fn fmt(&self, f: &mut Formatter) -> Result<(), std::fmt::Error> {