Skip to content

Commit 10bc7f9

Browse files
Use SyncingService for Eth
1 parent a25f485 commit 10bc7f9

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ sc-consensus-grandpa = { git = "https://github.com/humanode-network/substrate",
101101
sc-consensus-grandpa-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
102102
sc-executor = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
103103
sc-network = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
104+
sc-network-sync = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
104105
sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
105106
sc-rpc-api = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
106107
sc-rpc-spec-v2 = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }

crates/humanode-rpc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ sc-consensus-epochs = { workspace = true }
2929
sc-consensus-grandpa = { workspace = true }
3030
sc-consensus-grandpa-rpc = { workspace = true }
3131
sc-network = { workspace = true }
32+
sc-network-sync = { workspace = true }
3233
sc-rpc = { workspace = true }
3334
sc-rpc-api = { workspace = true }
3435
sc-rpc-spec-v2 = { workspace = true }

crates/humanode-rpc/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use sc_consensus_grandpa::{
2929
};
3030
use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer};
3131
use sc_network::NetworkService;
32+
use sc_network_sync::SyncingService;
3233
pub use sc_rpc_api::DenyUnsafe;
3334
use sc_rpc_spec_v2::chain_spec::{ChainSpec, ChainSpecApiServer};
3435
use sc_transaction_pool::{ChainApi, Pool};
@@ -126,8 +127,10 @@ pub struct Deps<C, P, BE, VKE, VSF, A: ChainApi, SC> {
126127
pub deny_unsafe: DenyUnsafe,
127128
/// Graph pool instance.
128129
pub graph: Arc<Pool<A>>,
129-
/// Network service
130+
/// Network service.
130131
pub network: Arc<NetworkService<Block, Hash>>,
132+
/// Chain syncing service.
133+
pub sync: Arc<SyncingService<Block>>,
131134
/// A copy of the chain spec.
132135
pub chain_spec: Box<dyn sc_chain_spec::ChainSpec>,
133136
/// AuthorExt specific dependencies.
@@ -191,6 +194,7 @@ where
191194
deny_unsafe,
192195
graph,
193196
network,
197+
sync,
194198
chain_spec,
195199
author_ext,
196200
is_authority,
@@ -303,7 +307,7 @@ where
303307
Arc::clone(&pool),
304308
graph,
305309
Some(humanode_runtime::TransactionConverter),
306-
Arc::clone(&network),
310+
Arc::clone(&sync),
307311
Vec::new(),
308312
Arc::clone(&eth_overrides),
309313
Arc::clone(&eth_backend),
@@ -324,7 +328,7 @@ where
324328
EthPubSub::new(
325329
Arc::clone(&pool),
326330
Arc::clone(&client),
327-
Arc::clone(&network),
331+
Arc::clone(&sync),
328332
Arc::clone(&subscription_task_executor),
329333
Arc::clone(&eth_overrides),
330334
Arc::clone(&eth_pubsub_notification_sinks),

0 commit comments

Comments
 (0)