[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
+11 -11
View File
@@ -21,14 +21,14 @@ use codec::{Encode, Decode};
use sp_runtime::{
generic::BlockId, traits::Block as BlockT, traits::NumberFor,
};
use state_machine::{
use sp_state_machine::{
self, OverlayedChanges, ExecutionManager, ExecutionStrategy,
ChangesTrieTransaction, StorageProof,
};
use executor::{RuntimeVersion, NativeVersion};
use externalities::Extensions;
use sc_executor::{RuntimeVersion, NativeVersion};
use sp_externalities::Extensions;
use hash_db::Hasher;
use primitives::{Blake2Hasher, NativeOrEncoded};
use sp_core::{Blake2Hasher, NativeOrEncoded};
use sp_api::{ProofRecorder, InitializeBlock};
use sp_blockchain;
@@ -41,7 +41,7 @@ where
H::Out: Ord,
{
/// Externalities error type.
type Error: state_machine::Error;
type Error: sp_state_machine::Error;
/// Execute a call to a contract on top of state in a block of given hash.
///
@@ -92,7 +92,7 @@ where
///
/// No changes are made.
fn call_at_state<
S: state_machine::Backend<H>,
S: sp_state_machine::Backend<H>,
F: FnOnce(
Result<NativeOrEncoded<R>, Self::Error>,
Result<NativeOrEncoded<R>, Self::Error>,
@@ -119,7 +119,7 @@ where
/// Execute a call to a contract on top of given state, gathering execution proof.
///
/// No changes are made.
fn prove_at_state<S: state_machine::Backend<H>>(
fn prove_at_state<S: sp_state_machine::Backend<H>>(
&self,
mut state: S,
overlay: &mut OverlayedChanges,
@@ -128,8 +128,8 @@ where
) -> Result<(Vec<u8>, StorageProof), sp_blockchain::Error> {
let trie_state = state.as_trie_backend()
.ok_or_else(||
Box::new(state_machine::ExecutionError::UnableToGenerateProof)
as Box<dyn state_machine::Error>
Box::new(sp_state_machine::ExecutionError::UnableToGenerateProof)
as Box<dyn sp_state_machine::Error>
)?;
self.prove_at_trie_state(trie_state, overlay, method, call_data)
}
@@ -137,9 +137,9 @@ where
/// Execute a call to a contract on top of given trie state, gathering execution proof.
///
/// No changes are made.
fn prove_at_trie_state<S: state_machine::TrieBackendStorage<H>>(
fn prove_at_trie_state<S: sp_state_machine::TrieBackendStorage<H>>(
&self,
trie_state: &state_machine::TrieBackend<S, H>,
trie_state: &sp_state_machine::TrieBackend<S, H>,
overlay: &mut OverlayedChanges,
method: &str,
call_data: &[u8]