[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
@@ -26,7 +26,7 @@ use crate::{
},
ext::Ext,
};
use primitives::{
use sp_core::{
storage::{
well_known_keys::{CHANGES_TRIE_CONFIG, CODE, HEAP_PAGES, is_child_storage_key},
Storage,
@@ -34,7 +34,7 @@ use primitives::{
hash::H256, Blake2Hasher,
};
use codec::Encode;
use externalities::{Extensions, Extension};
use sp_externalities::{Extensions, Extension};
/// Simple HashMap-based Externalities impl.
pub struct TestExternalities<H: Hasher<Out=H256>=Blake2Hasher, N: ChangesTrieBlockNumber=u64> {
@@ -125,7 +125,7 @@ impl<H: Hasher<Out=H256>, N: ChangesTrieBlockNumber> TestExternalities<H, N> {
/// Returns the result of the given closure.
pub fn execute_with<R>(&mut self, execute: impl FnOnce() -> R) -> R {
let mut ext = self.ext();
externalities::set_and_run_with_externalities(&mut ext, execute)
sp_externalities::set_and_run_with_externalities(&mut ext, execute)
}
}
@@ -153,7 +153,7 @@ impl<H: Hasher<Out=H256>, N: ChangesTrieBlockNumber> From<Storage> for TestExter
}
}
impl<H, N> externalities::ExtensionStore for TestExternalities<H, N> where
impl<H, N> sp_externalities::ExtensionStore for TestExternalities<H, N> where
H: Hasher<Out=H256>,
N: ChangesTrieBlockNumber,
{
@@ -165,7 +165,7 @@ impl<H, N> externalities::ExtensionStore for TestExternalities<H, N> where
#[cfg(test)]
mod tests {
use super::*;
use primitives::traits::Externalities;
use sp_core::traits::Externalities;
use hex_literal::hex;
#[test]