Skip to content

Commit

Permalink
Use SyncingService for Eth
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrylavrenov committed Dec 7, 2023
1 parent a25f485 commit 93071eb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ sc-consensus-grandpa = { git = "https://github.com/humanode-network/substrate",
sc-consensus-grandpa-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-executor = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-network = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-network-sync = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-rpc-api = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
sc-rpc-spec-v2 = { git = "https://github.com/humanode-network/substrate", branch = "locked/polkadot-v0.9.40", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions crates/humanode-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ sc-consensus-epochs = { workspace = true }
sc-consensus-grandpa = { workspace = true }
sc-consensus-grandpa-rpc = { workspace = true }
sc-network = { workspace = true }
sc-network-sync = { workspace = true }
sc-rpc = { workspace = true }
sc-rpc-api = { workspace = true }
sc-rpc-spec-v2 = { workspace = true }
Expand Down
8 changes: 6 additions & 2 deletions crates/humanode-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use sc_consensus_grandpa::{
};
use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer};
use sc_network::NetworkService;
use sc_network_sync::SyncingService;
pub use sc_rpc_api::DenyUnsafe;
use sc_rpc_spec_v2::chain_spec::{ChainSpec, ChainSpecApiServer};
use sc_transaction_pool::{ChainApi, Pool};
Expand Down Expand Up @@ -126,8 +127,10 @@ pub struct Deps<C, P, BE, VKE, VSF, A: ChainApi, SC> {
pub deny_unsafe: DenyUnsafe,
/// Graph pool instance.
pub graph: Arc<Pool<A>>,
/// Network service
/// Network service.
pub network: Arc<NetworkService<Block, Hash>>,
/// Chain syncing service.
pub sync: Arc<SyncingService<Block>>,
/// A copy of the chain spec.
pub chain_spec: Box<dyn sc_chain_spec::ChainSpec>,
/// AuthorExt specific dependencies.
Expand Down Expand Up @@ -191,6 +194,7 @@ where
deny_unsafe,
graph,
network,
sync,
chain_spec,
author_ext,
is_authority,
Expand Down Expand Up @@ -303,7 +307,7 @@ where
Arc::clone(&pool),
graph,
Some(humanode_runtime::TransactionConverter),
Arc::clone(&network),
Arc::clone(&sync),
Vec::new(),
Arc::clone(&eth_overrides),
Arc::clone(&eth_backend),
Expand Down

0 comments on commit 93071eb

Please sign in to comment.