Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed May 3, 2024
1 parent 180e1d5 commit 256fbe8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
22 changes: 11 additions & 11 deletions cumulus/polkadot-parachain/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@ use sc_service::{PartialComponents, TFullBackend, TFullClient};
use sc_telemetry::{Telemetry, TelemetryWorkerHandle};
use std::{sync::Arc};

/// Module with common types.
///
/// The idea is to help downstream implementors who don't rely on `parachains_common` for types.
/// Proxying the imports paths via this module makes it possible to only adjust imports here, as
/// opposed to replacing `parachains_common` imports in every file.
pub mod common_types {
pub use parachains_common::{AuraId, AccountId, Balance, Block, Hash, Nonce, Header};
}

use common_types::Block;

// Exports from the service module

pub use start_nodes::{
Expand All @@ -55,6 +44,17 @@ pub use consensus::{
pub use new_partial::new_partial;
pub use rpc_extensions::{build_contracts_rpc_extensions, build_parachain_rpc_extensions};

/// Module with common types.
///
/// The idea is to help downstream implementors who don't rely on `parachains_common` for types.
/// Proxying the imports paths via this module makes it possible to only adjust imports here, as
/// opposed to replacing `parachains_common` imports in every file.
pub mod common_types {
pub use parachains_common::{AuraId, AccountId, Balance, Block, Hash, Nonce, Header};
}

use common_types::Block;

#[cfg(not(feature = "runtime-benchmarks"))]
type HostFunctions = cumulus_client_service::ParachainHostFunctions;

Expand Down
16 changes: 16 additions & 0 deletions cumulus/polkadot-parachain/src/service/rpc_extensions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Cumulus.

// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

use crate::service::{
common_types::{AccountId, Balance, Block, Nonce},
ParachainBackend, ParachainClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use jsonrpsee::RpcModule;
use sc_network::NetworkBackend;
use sc_service::{Configuration, TaskManager};
use sc_telemetry::TelemetryHandle;

use std::sync::Arc;

/// Start a polkadot-shell parachain node.
Expand Down

0 comments on commit 256fbe8

Please sign in to comment.