From 20b4e9a15f0d9a4b7eb40bb0b517b3af0ff2ea08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Chuda=C5=9B?= Date: Tue, 6 Feb 2024 11:35:07 +0100 Subject: [PATCH] fixes --- .../chunk_endorsement_tracker.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/chain/client/src/stateless_validation/chunk_endorsement_tracker.rs b/chain/client/src/stateless_validation/chunk_endorsement_tracker.rs index 92ca32ff47f..371647a451c 100644 --- a/chain/client/src/stateless_validation/chunk_endorsement_tracker.rs +++ b/chain/client/src/stateless_validation/chunk_endorsement_tracker.rs @@ -66,19 +66,12 @@ impl ChunkEndorsementTracker { let mut guard = self.pending_chunk_endorsements.lock(); guard.pop(chunk_hash) }; - let chunk_endorsements = match chunk_endorsements { - Some(chunk_endorsements) => chunk_endorsements, - None => { - return; - } - }; + let Some(chunk_endorsements) = chunk_endorsements else { return; }; tracing::debug!(target: "stateless_validation", ?chunk_hash, "Processing pending chunk endorsements."); for endorsement in chunk_endorsements.values() { - let _ = self.process_chunk_endorsement(chunk_header, endorsement.clone()) - .map_err(|error| { - tracing::debug!(target: "stateless_validation", ?endorsement, "Error processing pending chunk endorsement: {:?}", error); - error - }); + if let Err(error) = self.process_chunk_endorsement(chunk_header, endorsement.clone()) { + tracing::debug!(target: "stateless_validation", ?endorsement, "Error processing pending chunk endorsement: {:?}", error); + } } }