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 10bc7f9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 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
10 changes: 7 additions & 3 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),

Check failure on line 313 in crates/humanode-rpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Ubuntu 22.04 / build with try-runtime

mismatched types

Check failure on line 313 in crates/humanode-rpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Ubuntu 22.04 / test-run pallet benchmarks

mismatched types

Check failure on line 313 in crates/humanode-rpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / End-to-end tests

mismatched types

Check failure on line 313 in crates/humanode-rpc/src/lib.rs

View workflow job for this annotation

GitHub Actions / Ubuntu 22.04 / doc

mismatched types
Expand All @@ -324,7 +328,7 @@ where
EthPubSub::new(
Arc::clone(&pool),
Arc::clone(&client),
Arc::clone(&network),
Arc::clone(&sync),
Arc::clone(&subscription_task_executor),
Arc::clone(&eth_overrides),
Arc::clone(&eth_pubsub_notification_sinks),
Expand Down

0 comments on commit 10bc7f9

Please sign in to comment.