[big refactor] Remove crate aliasing. (#4395)

* Rename: Phase 1.

* Unify codec.

* Fixing: Phase 2

* Fixing: Phase 3.

* Fixing: Phase 4.

* Fixing: Phase 5.

* Fixing: Phase 6.

* Fixing: Phase 7.

* Fixing: Phase 8. Tests

* Fixing: Phase 9. Tests!!!

* Fixing: Phase 10. Moar tests!

* Finally done!

* More fixes.

* Rename primitives:: to sp_core::

* Apply renames in finality-grandpa.

* Fix benches.

* Fix benches 2.

* Revert node-template.

* Fix frame-system in our modules.
This commit is contained in:
Tomasz Drwięga
2019-12-16 13:36:49 +01:00
committed by Gavin Wood
parent f14d98a439
commit 8778ca7dc8
485 changed files with 4023 additions and 4005 deletions
@@ -7,8 +7,8 @@ build = "build.rs"
[dependencies]
ansi_term = "0.12.1"
keystore = { package = "sc-keystore", path = "../../../client/keystore" }
sc-keystore = { path = "../../../client/keystore" }
node-cli = { path = "../../node/cli" }
primitives = { package = "sp-core", path = "../../../primitives/core" }
sp-core = { path = "../../../primitives/core" }
rand = "0.7.2"
structopt = "0.3.3"
@@ -20,9 +20,9 @@ use ansi_term::Style;
use rand::{Rng, distributions::Alphanumeric, rngs::OsRng};
use structopt::StructOpt;
use keystore::{Store as Keystore};
use sc_keystore::{Store as Keystore};
use node_cli::chain_spec::{self, AccountId};
use primitives::{sr25519, crypto::{Public, Ss58Codec}, traits::BareCryptoStore};
use sp_core::{sr25519, crypto::{Public, Ss58Codec}, traits::BareCryptoStore};
/// A utility to easily create a testnet chain spec definition with a given set
/// of authorities and endowed accounts and/or generate random accounts.
@@ -153,22 +153,22 @@ fn generate_authority_keys_and_store(
};
insert_key(
primitives::crypto::key_types::BABE,
sp_core::crypto::key_types::BABE,
babe.as_slice(),
)?;
insert_key(
primitives::crypto::key_types::GRANDPA,
sp_core::crypto::key_types::GRANDPA,
grandpa.as_slice(),
)?;
insert_key(
primitives::crypto::key_types::IM_ONLINE,
sp_core::crypto::key_types::IM_ONLINE,
im_online.as_slice(),
)?;
insert_key(
primitives::crypto::key_types::AUTHORITY_DISCOVERY,
sp_core::crypto::key_types::AUTHORITY_DISCOVERY,
authority_discovery.as_slice(),
)?;
}
+4 -4
View File
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
primitives = { package = "sp-core", version = "*", path = "../../../primitives/core" }
sp-core = { version = "*", path = "../../../primitives/core" }
node-runtime = { version = "*", path = "../../node/runtime" }
node-primitives = { version = "*", path = "../../node/primitives" }
sp-runtime = { version = "*", path = "../../../primitives/runtime" }
@@ -17,9 +17,9 @@ substrate-bip39 = "0.3.1"
hex = "0.4.0"
hex-literal = "0.2.1"
codec = { package = "parity-scale-codec", version = "1.0.0" }
system = { package = "frame-system", path = "../../../frame/system" }
balances = { package = "pallet-balances", path = "../../../frame/balances" }
transaction-payment = { package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }
frame-system = { path = "../../../frame/system" }
pallet-balances = { path = "../../../frame/balances" }
pallet-transaction-payment = { path = "../../../frame/transaction-payment" }
[features]
bench = []
+8 -8
View File
@@ -24,7 +24,7 @@ use codec::{Decode, Encode};
use hex_literal::hex;
use node_primitives::{Balance, Hash, Index, AccountId, Signature};
use node_runtime::{BalancesCall, Call, Runtime, SignedPayload, UncheckedExtrinsic, VERSION};
use primitives::{
use sp_core::{
crypto::{set_default_ss58_version, Ss58AddressFormat, Ss58Codec},
ed25519, sr25519, ecdsa, Pair, Public, H256, hexdisplay::HexDisplay,
};
@@ -197,7 +197,7 @@ fn get_app<'a, 'b>() -> App<'a, 'b> {
-s, --suri <suri> 'The secret key URI.'
"),
SubCommand::with_name("transfer")
.about("Author and sign a Node balances::Transfer transaction with a given (secret) key")
.about("Author and sign a Node pallet_balances::Transfer transaction with a given (secret) key")
.args_from_usage("
<genesis> -g, --genesis <genesis> 'The genesis hash or a recognised \
chain identifier (dev, elm, alex).'
@@ -484,12 +484,12 @@ fn create_extrinsic<C: Crypto>(
{
let extra = |i: Index, f: Balance| {
(
system::CheckVersion::<Runtime>::new(),
system::CheckGenesis::<Runtime>::new(),
system::CheckEra::<Runtime>::from(Era::Immortal),
system::CheckNonce::<Runtime>::from(i),
system::CheckWeight::<Runtime>::new(),
transaction_payment::ChargeTransactionPayment::<Runtime>::from(f),
frame_system::CheckVersion::<Runtime>::new(),
frame_system::CheckGenesis::<Runtime>::new(),
frame_system::CheckEra::<Runtime>::from(Era::Immortal),
frame_system::CheckNonce::<Runtime>::from(i),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(f),
Default::default(),
)
};
+2 -2
View File
@@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use super::{PublicOf, PublicT, Crypto};
use primitives::Pair;
use sp_core::Pair;
use rand::{rngs::OsRng, RngCore};
fn good_waypoint(done: u64) -> u64 {
@@ -110,7 +110,7 @@ pub(super) fn generate_key<C: Crypto>(desired: &str) -> Result<KeyPair<C>, &str>
mod tests {
use super::super::Ed25519;
use super::*;
use primitives::{crypto::Ss58Codec, Pair};
use sp_core::{crypto::Ss58Codec, Pair};
#[cfg(feature = "bench")]
use test::Bencher;