Skip to content

Commit

Permalink
dev(better_theoros): 🔨 nitpicking optis
Browse files Browse the repository at this point in the history
  • Loading branch information
akhercha committed Nov 2, 2024
1 parent 397d014 commit 66b5340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rust/theoros/src/rpc/evm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ impl HyperlaneValidatorsMapping {
}

/// Get the available validators for a chain & their indexes
pub fn get_validators(&self, chain_name: &EvmChainName) -> Option<HashMap<Felt, u8>> {
self.0.get(chain_name).cloned()
pub fn get_validators(&self, chain_name: &EvmChainName) -> Option<&HashMap<Felt, u8>> {
self.0.get(chain_name)
}

/// Get all configured chains names
Expand Down
4 changes: 2 additions & 2 deletions rust/theoros/src/types/calldata.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashMap, str::FromStr};
use std::str::FromStr;

use alloy::{primitives::U256, signers::Signature};
use anyhow::Context;
Expand Down Expand Up @@ -36,7 +36,7 @@ impl Calldata {
let feed_id = hex_str_to_u256(&feed_id)?;
let update_info = state.storage.latest_update_per_feed().get(&feed_id).await?.context("No update found")?;

let validator_index_map: HashMap<Felt, u8> =
let validator_index_map =
state.hyperlane_validators_mapping.get_validators(&chain_name).context("No validators found")?;

let validators: Vec<Felt> = validator_index_map.keys().copied().collect();
Expand Down

0 comments on commit 66b5340

Please sign in to comment.