From 99de43b400f76093318f8d3b4aec2936dd52ae83 Mon Sep 17 00:00:00 2001 From: Zhoujun Ma Date: Mon, 5 Feb 2024 04:26:14 +0000 Subject: [PATCH] update --- .../src/observation_aggregation/mod.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/aptos-jwk-consensus/src/observation_aggregation/mod.rs b/crates/aptos-jwk-consensus/src/observation_aggregation/mod.rs index 909b475d5dca0..c4135557fb7f9 100644 --- a/crates/aptos-jwk-consensus/src/observation_aggregation/mod.rs +++ b/crates/aptos-jwk-consensus/src/observation_aggregation/mod.rs @@ -4,19 +4,18 @@ use crate::types::{ JWKConsensusMsg, ObservedUpdate, ObservedUpdateRequest, ObservedUpdateResponse, }; use anyhow::{anyhow, ensure}; +use aptos_bitvec::BitVec; use aptos_consensus_types::common::Author; use aptos_crypto::bls12381::Signature; use aptos_infallible::Mutex; use aptos_reliable_broadcast::BroadcastStatus; use aptos_types::{ - aggregate_signature::PartialSignatures, + aggregate_signature::{AggregateSignature, PartialSignatures}, epoch_state::EpochState, jwks::{ProviderJWKs, QuorumCertifiedUpdate}, }; use move_core_types::account_address::AccountAddress; use std::{collections::BTreeSet, sync::Arc}; -use aptos_bitvec::BitVec; -use aptos_types::aggregate_signature::AggregateSignature; /// The aggregation state of reliable broadcast where a validator broadcast JWK observation requests /// and produce quorum-certified JWK updates. @@ -95,7 +94,14 @@ impl BroadcastStatus for Arc { .collect::>(), ) .map_err(|e| anyhow!("jwk update certification failed with sig agg error: {e}"))?; - let signer_bit_vec = BitVec::from(self.epoch_state.verifier.get_ordered_account_addresses().into_iter().map(|addr|voters.contains(&addr)).collect::>()); + let signer_bit_vec = BitVec::from( + self.epoch_state + .verifier + .get_ordered_account_addresses() + .into_iter() + .map(|addr| voters.contains(&addr)) + .collect::>(), + ); let multi_sig = AggregateSignature::new(signer_bit_vec, Some(multi_sig)); Ok(Some(QuorumCertifiedUpdate {