Skip to content

Commit

Permalink
change query_registration_detail return type to fixed length array
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodeymo committed Dec 16, 2024
1 parent 48c5ad2 commit 82ba541
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/chainio/clients/avsregistry/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ impl AvsRegistryChainReader {
pub async fn query_registration_detail(
&self,
operator_address: Address,
) -> Result<Vec<bool>, AvsRegistryError> {
) -> Result<[bool; 64], AvsRegistryError> {
let operator_id = self.get_operator_id(operator_address).await?;

let provider = get_provider(&self.provider);
Expand All @@ -428,11 +428,10 @@ impl AvsRegistryChainReader {
.await?;

let inner_value = quorum_bitmap._0.into_limbs()[0];

let mut quorums = Vec::<bool>::new();
let mut quorums: [bool; 64] = [false; 64];
for i in 0..64_u64 {
let other = inner_value & (1 << i) != 0;
quorums.push(other);
quorums[i as usize] = other;
}
Ok(quorums)
}
Expand Down

0 comments on commit 82ba541

Please sign in to comment.