Skip to content

Commit f29aecd

Browse files
committed
chain/ethereum: Remoe unused chain_store from PollingBlckStreamContext
1 parent d577345 commit f29aecd

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

chain/ethereum/src/chain.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ impl BlockStreamBuilder<Chain> for EthereumStreamBuilder {
175175
.logger_factory
176176
.subgraph_logger(&deployment)
177177
.new(o!("component" => "BlockStream"));
178-
let chain_store = chain.chain_store.cheap_clone();
179178
let chain_head_update_stream = chain
180179
.chain_head_update_listener
181180
.subscribe(chain.name.to_string(), logger.clone());
@@ -213,7 +212,6 @@ impl BlockStreamBuilder<Chain> for EthereumStreamBuilder {
213212
};
214213

215214
Ok(Box::new(PollingBlockStream::new(
216-
chain_store,
217215
chain_head_update_stream,
218216
Arc::new(adapter),
219217
chain.node_id.clone(),

chain/ethereum/src/polling_block_stream.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use graph::blockchain::block_stream::{
1313
};
1414
use graph::blockchain::{Block, BlockPtr, TriggerFilterWrapper};
1515
use graph::futures03::{stream::Stream, Future, FutureExt};
16-
use graph::prelude::{ChainStore, CheapClone, DeploymentHash, NodeId, BLOCK_NUMBER_MAX};
16+
use graph::prelude::{DeploymentHash, NodeId, BLOCK_NUMBER_MAX};
1717
use graph::slog::{debug, info, trace, warn, Logger};
1818

1919
use graph::components::store::BlockNumber;
@@ -73,7 +73,6 @@ enum ReconciliationStep {
7373
}
7474

7575
struct PollingBlockStreamContext {
76-
chain_store: Arc<dyn ChainStore>,
7776
adapter: Arc<TriggersAdapterWrapper<Chain>>,
7877
node_id: NodeId,
7978
subgraph_id: DeploymentHash,
@@ -96,7 +95,6 @@ struct PollingBlockStreamContext {
9695
impl Clone for PollingBlockStreamContext {
9796
fn clone(&self) -> Self {
9897
Self {
99-
chain_store: self.chain_store.cheap_clone(),
10098
adapter: self.adapter.clone(),
10199
node_id: self.node_id.clone(),
102100
subgraph_id: self.subgraph_id.clone(),
@@ -133,7 +131,6 @@ enum NextBlocks {
133131

134132
impl PollingBlockStream {
135133
pub fn new(
136-
chain_store: Arc<dyn ChainStore>,
137134
chain_head_update_stream: ChainHeadUpdateStream,
138135
adapter: Arc<TriggersAdapterWrapper<Chain>>,
139136
node_id: NodeId,
@@ -153,7 +150,6 @@ impl PollingBlockStream {
153150
chain_head_update_stream,
154151
ctx: PollingBlockStreamContext {
155152
current_block: start_block,
156-
chain_store,
157153
adapter,
158154
node_id,
159155
subgraph_id,

0 commit comments

Comments
 (0)