[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
+10 -10
View File
@@ -19,7 +19,7 @@
use super::*;
use mock::{new_test_ext, Babe, Test};
use sp_runtime::{traits::OnFinalize, testing::{Digest, DigestItem}};
use session::ShouldEndSession;
use pallet_session::ShouldEndSession;
const EMPTY_RANDOMNESS: [u8; 32] = [
74, 25, 49, 128, 53, 97, 244, 49,
@@ -29,18 +29,18 @@ const EMPTY_RANDOMNESS: [u8; 32] = [
];
fn make_pre_digest(
authority_index: babe_primitives::AuthorityIndex,
slot_number: babe_primitives::SlotNumber,
vrf_output: [u8; babe_primitives::VRF_OUTPUT_LENGTH],
vrf_proof: [u8; babe_primitives::VRF_PROOF_LENGTH],
authority_index: sp_consensus_babe::AuthorityIndex,
slot_number: sp_consensus_babe::SlotNumber,
vrf_output: [u8; sp_consensus_babe::VRF_OUTPUT_LENGTH],
vrf_proof: [u8; sp_consensus_babe::VRF_PROOF_LENGTH],
) -> Digest {
let digest_data = babe_primitives::RawBabePreDigest::Primary {
let digest_data = sp_consensus_babe::RawBabePreDigest::Primary {
authority_index,
slot_number,
vrf_output,
vrf_proof,
};
let log = DigestItem::PreRuntime(babe_primitives::BABE_ENGINE_ID, digest_data.encode());
let log = DigestItem::PreRuntime(sp_consensus_babe::BABE_ENGINE_ID, digest_data.encode());
Digest { logs: vec![log] }
}
@@ -66,7 +66,7 @@ fn check_module() {
})
}
type System = system::Module<Test>;
type System = frame_system::Module<Test>;
#[test]
fn first_block_epoch_zero_start() {
@@ -103,8 +103,8 @@ fn first_block_epoch_zero_start() {
assert_eq!(header.digest.logs[0], pre_digest.logs[0]);
let authorities = Babe::authorities();
let consensus_log = babe_primitives::ConsensusLog::NextEpochData(
babe_primitives::NextEpochDescriptor {
let consensus_log = sp_consensus_babe::ConsensusLog::NextEpochData(
sp_consensus_babe::NextEpochDescriptor {
authorities,
randomness: Babe::randomness(),
}