Skip to content

Commit

Permalink
code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mangas committed Jun 10, 2024
1 parent 89973dd commit 9549e19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chain/ethereum/src/ingestor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl PollingBlockIngestor {
// To check if there is a new block or not, fetch only the block header since that's cheaper
// than the full block. This is worthwhile because most of the time there won't be a new
// block, as we expect the poll interval to be much shorter than the block time.
let latest_block = self.latest_block(&logger, &eth_adapter).await?;
let latest_block = self.latest_block(logger, &eth_adapter).await?;

if let Some(head_block) = head_block_ptr_opt.as_ref() {
// If latest block matches head block in store, nothing needs to be done
Expand Down
6 changes: 5 additions & 1 deletion chain/ethereum/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub struct EthereumNetworkAdapters {
}

impl EthereumNetworkAdapters {
#[cfg(debug_assertions)]
pub fn empty() -> Self {
Self {
chain_id: "".into(),
Expand Down Expand Up @@ -150,6 +151,9 @@ impl EthereumNetworkAdapters {
.filter(|adapter| adapter.get_capacity() > AvailableCapacity::Unavailable)
}

/// returns all the available adapters that meet the required capabilities
/// if no adapters are available at the time or none that meet the capabilities then
/// an empty iterator is returned.
pub async fn all_cheapest_with(
&self,
required_capabilities: &NodeCapabilities,
Expand All @@ -164,7 +168,7 @@ impl EthereumNetworkAdapters {
}

// get all the adapters, don't trigger the ProviderManager's validations because we want
// this function to remain sync
// this function to remain sync. If no adapters are available an empty iterator is returned.
pub(crate) fn all_unverified_cheapest_with(
&self,
required_capabilities: &NodeCapabilities,
Expand Down

0 comments on commit 9549e19

Please sign in to comment.