diff --git a/src/network/protocol.rs b/src/network/protocol.rs index f94594b..a513365 100644 --- a/src/network/protocol.rs +++ b/src/network/protocol.rs @@ -176,7 +176,6 @@ where // debug desync pub(crate) pending_checksums: VecDeque<(Frame, u128)>, - last_added_checksum_frame: Frame, } impl PartialEq for UdpProtocol { @@ -262,7 +261,6 @@ impl UdpProtocol { // debug desync pending_checksums: VecDeque::new(), - last_added_checksum_frame: NULL_FRAME, } } @@ -710,12 +708,10 @@ impl UdpProtocol { /// Upon receiving a `ChecksumReport`, add it to the checksum history fn on_checksum_report(&mut self, body: &ChecksumReport) { - if self.last_added_checksum_frame < body.frame { - self.pending_checksums - .truncate(MAX_CHECKSUM_HISTORY_SIZE - 1); - self.pending_checksums - .push_front((body.frame, body.checksum)); - } + self.pending_checksums + .truncate(MAX_CHECKSUM_HISTORY_SIZE - 1); + self.pending_checksums + .push_front((body.frame, body.checksum)); } /// Returns the frame of the last received input