Skip to content

Commit 37bf3cd

Browse files
author
Zoran Cvetkov
committed
rebase fixes for vec
1 parent a60c653 commit 37bf3cd

File tree

11 files changed

+14
-18
lines changed

11 files changed

+14
-18
lines changed

chain/arweave/src/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use graph::{
2727
prelude::{async_trait, o, BlockNumber, ChainStore, Error, Logger, LoggerFactory},
2828
};
2929
use prost::Message;
30-
use std::collections::{HashMap, HashSet};
30+
use std::collections::HashSet;
3131
use std::sync::Arc;
3232

3333
use crate::adapter::TriggerFilter;

chain/cosmos/src/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use graph::components::adapter::ChainId;
44
use graph::env::EnvVars;
55
use graph::prelude::MetricsRegistry;
66
use graph::substreams::Clock;
7-
use std::collections::{HashMap, HashSet};
7+
use std::collections::HashSet;
88
use std::convert::TryFrom;
99
use std::sync::Arc;
1010

chain/ethereum/src/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use graph::{
3737
},
3838
};
3939
use prost::Message;
40-
use std::collections::{HashMap, HashSet};
40+
use std::collections::HashSet;
4141
use std::iter::FromIterator;
4242
use std::sync::Arc;
4343
use std::time::Duration;

chain/near/src/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use graph::{
3232
prelude::{async_trait, o, BlockNumber, ChainStore, Error, Logger, LoggerFactory},
3333
};
3434
use prost::Message;
35-
use std::collections::{HashMap, HashSet};
35+
use std::collections::HashSet;
3636
use std::sync::Arc;
3737

3838
use crate::adapter::TriggerFilter;

chain/starknet/src/chain.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ use graph::{
3030
slog::o,
3131
};
3232
use prost::Message;
33-
use std::{
34-
collections::{HashMap, HashSet},
35-
sync::Arc,
36-
};
33+
use std::{collections::HashSet, sync::Arc};
3734

3835
use crate::{
3936
adapter::TriggerFilter,

chain/substreams/src/block_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::Result;
2-
use std::{collections::HashMap, sync::Arc};
2+
use std::sync::Arc;
33

44
use graph::{
55
blockchain::{

chain/substreams/src/chain.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use graph::{
2323
slog::Logger,
2424
};
2525

26-
use std::collections::HashMap;
2726
use std::sync::Arc;
2827

2928
// ParsedChanges are an internal representation of the equivalent operations defined on the

core/src/subgraph/inputs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use graph::{
88
data_source::DataSourceTemplate,
99
prelude::BlockNumber,
1010
};
11-
use std::collections::{BTreeSet, HashMap};
11+
use std::collections::BTreeSet;
1212
use std::sync::Arc;
1313

1414
pub struct IndexingInputs<C: Blockchain> {

core/src/subgraph/instance_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::subgraph::context::{IndexingContext, SubgraphKeepAlive};
33
use crate::subgraph::inputs::IndexingInputs;
44
use crate::subgraph::loader::load_dynamic_data_sources;
55
use crate::subgraph::Decoder;
6-
use std::collections::{BTreeSet, HashMap};
6+
use std::collections::BTreeSet;
77

88
use crate::subgraph::runner::SubgraphRunner;
99
use graph::blockchain::block_stream::{BlockStreamMetrics, TriggersAdapterWrapper};

graph/src/blockchain/block_stream.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,13 @@ impl<C: Blockchain> TriggersAdapterWrapper<C> {
326326
adapter: Arc<dyn TriggersAdapter<C>>,
327327
source_subgraph_stores: Vec<Arc<dyn SourceableStore>>,
328328
) -> Self {
329+
let stores_map: HashMap<_, _> = source_subgraph_stores
330+
.iter()
331+
.map(|store| (store.input_schema().id().clone(), store.clone()))
332+
.collect();
329333
Self {
330334
adapter,
331-
source_subgraph_stores,
335+
source_subgraph_stores: stores_map,
332336
}
333337
}
334338

0 commit comments

Comments
 (0)