From 5375a144edba1389a30ca79eaa712d7f12f601e2 Mon Sep 17 00:00:00 2001 From: Danial Mehrjerdi Date: Thu, 12 Jun 2025 12:48:01 +0200 Subject: [PATCH] Update signatures to make sure they are sorted by guardian index --- apps/quorum/Cargo.lock | 2 +- apps/quorum/Cargo.toml | 2 +- apps/quorum/src/api.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/quorum/Cargo.lock b/apps/quorum/Cargo.lock index 4781d4730a..e7ccda9cfd 100644 --- a/apps/quorum/Cargo.lock +++ b/apps/quorum/Cargo.lock @@ -2671,7 +2671,7 @@ dependencies = [ [[package]] name = "quorum" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "axum", diff --git a/apps/quorum/Cargo.toml b/apps/quorum/Cargo.toml index af107ad141..edbbc98a53 100644 --- a/apps/quorum/Cargo.toml +++ b/apps/quorum/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quorum" -version = "0.1.1" +version = "0.1.2" edition = "2021" [dependencies] diff --git a/apps/quorum/src/api.rs b/apps/quorum/src/api.rs index b5de1b26cc..63356857b3 100644 --- a/apps/quorum/src/api.rs +++ b/apps/quorum/src/api.rs @@ -141,6 +141,7 @@ async fn handle_observation( .and_modify(|sigs| { if sigs.iter().all(|sig| sig.index != new_signature.index) { sigs.push(new_signature); + sigs.sort_by(|a, b| a.index.cmp(&b.index)); } }) .or_insert_with(|| vec![new_signature])