Skip to content

Commit

Permalink
Fix node_urls cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Jun 18, 2024
1 parent 01522ae commit e7431c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/parser/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub mod parser_proxy;

use std::{collections::HashMap, str::FromStr};

use primitives::{node::Node, Chain};
use primitives::Chain;
use settings::Settings;
use storage::DatabaseClient;

Expand Down Expand Up @@ -54,7 +54,12 @@ pub async fn main() {
for chain in chains {
let settings = settings.clone();
let parser_options = parser_options.clone();
let node_urls = nodes_map[&chain.to_string()].clone();
let node_urls = nodes_map
.clone()
.get(chain.as_ref())
.cloned()
.unwrap_or_default();

let parser = tokio::spawn(async move {
parser_start(settings, parser_options, chain, node_urls).await;
});
Expand Down

0 comments on commit e7431c9

Please sign in to comment.