From 49aedf4f0b0b24cebc53e1fe16ccaf6966fe2b12 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Fri, 28 Apr 2023 20:25:14 +0200 Subject: [PATCH] fix(#108): comparison was inverted --- pallets/certification/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index 9b423da0d..27fab1982 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -471,7 +471,7 @@ pub mod pallet { let mut removed = false; CertsByReceiver::<T, I>::mutate_exists(receiver, |issuers_opt| { let issuers = issuers_opt.get_or_insert(Vec::with_capacity(0)); - if let Ok(index) = issuers.binary_search_by(|(issuer_, _)| issuer.cmp(issuer_)) { + if let Ok(index) = issuers.binary_search_by(|(issuer_, _)| issuer_.cmp(&issuer)) { if let Some(block_number) = block_number_opt { if let Some((_, removable_on)) = issuers.get(index) { if *removable_on == block_number { -- GitLab