,
+ /// Transaction pool instance.
+ pub pool: Arc,
/// Remote access to the blockchain (async).
pub remote_blockchain: Arc>,
/// Fetcher instance.
pub fetcher: Arc,
}
-impl LightDeps {
- /// Create empty `LightDeps` with given `F` type.
- ///
- /// This is a convenience method to be used in the service builder,
- /// to make sure the type of the `LightDeps` is matching.
- pub fn none(_: Option>) -> Option {
- None
- }
+/// Extra dependencies for BABE.
+pub struct BabeDeps {
+ /// BABE protocol config.
+ pub babe_config: Config,
+ /// BABE pending epoch changes.
+ pub shared_epoch_changes: SharedEpochChanges,
+ /// The keystore that manages the keys of the node.
+ pub keystore: KeyStorePtr,
}
-/// Instantiate all RPC extensions.
-///
-/// If you provide `LightDeps`, the system is configured for light client.
-pub fn create(
- client: Arc,
- pool: Arc,
- light_deps: Option>,
+/// Full client dependencies.
+pub struct FullDeps {
+ /// The client instance to use.
+ pub client: Arc,
+ /// Transaction pool instance.
+ pub pool: Arc,
+ /// The SelectChain Strategy
+ pub select_chain: SC,
+ /// BABE specific dependencies.
+ pub babe: BabeDeps,
+}
+
+/// Instantiate all Full RPC extensions.
+pub fn create_full(
+ deps: FullDeps,
) -> jsonrpc_core::IoHandler where
C: ProvideRuntimeApi,
- C: sc_client::blockchain::HeaderBackend,
+ C: HeaderBackend + HeaderMetadata + 'static,
C: Send + Sync + 'static,
C::Api: substrate_frame_rpc_system::AccountNonceApi,
C::Api: pallet_contracts_rpc::ContractsRuntimeApi,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi,
- F: sc_client::light::fetcher::Fetcher + 'static,
+ C::Api: BabeApi