The crate rename (#4223)

* Adding script for rename, could be applicable for nodes on top of it, too

* add stderr and gitlab ci features

* apply script

* fix now minor details in expected stderr

* Update the Cargo.lock

* fix name: sc-transaction -> sc-tracing

* fix rename in script, too
This commit is contained in:
Benjamin Kampmann
2019-12-02 11:23:53 +01:00
committed by GitHub
parent 40f6d05a4c
commit 927e13c13a
468 changed files with 3383 additions and 3271 deletions
+4 -4
View File
@@ -44,7 +44,7 @@ use std::collections::{BTreeSet, BTreeMap};
use log::warn;
use sp_blockchain::{Error as ClientError, Result as ClientResult};
use sr_primitives::traits::{
use sp_runtime::traits::{
Block as BlockT, NumberFor, Zero, Bounded, CheckedSub
};
@@ -651,7 +651,7 @@ pub fn destroy_fork<Block: BlockT, T: CacheItemT, S: Storage<Block, T>, Tx: Stor
/// Blockchain related functions.
mod chain {
use sr_primitives::traits::Header as HeaderT;
use sp_runtime::traits::Header as HeaderT;
use super::*;
/// Is the block1 connected both ends of the range.
@@ -725,8 +725,8 @@ fn read_forks<Block: BlockT, T: CacheItemT, S: Storage<Block, T>>(
#[cfg(test)]
pub mod tests {
use test_client::runtime::H256;
use sr_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
use sr_primitives::traits::Header as HeaderT;
use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
use sp_runtime::traits::Header as HeaderT;
use crate::cache::list_storage::tests::{DummyStorage, FaultyStorage, DummyTransaction};
use super::*;
+1 -1
View File
@@ -17,7 +17,7 @@
//! List-cache storage entries.
use sp_blockchain::Result as ClientResult;
use sr_primitives::traits::{Block as BlockT, NumberFor};
use sp_runtime::traits::{Block as BlockT, NumberFor};
use codec::{Encode, Decode};
use crate::cache::{CacheItemT, ComplexBlockId};
+2 -2
View File
@@ -22,8 +22,8 @@ use kvdb::{KeyValueDB, DBTransaction};
use sp_blockchain::{Error as ClientError, Result as ClientResult};
use codec::{Encode, Decode};
use sr_primitives::generic::BlockId;
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
use sp_runtime::generic::BlockId;
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
use crate::utils::{self, db_err, meta_keys};
use crate::cache::{CacheItemT, ComplexBlockId};
+2 -2
View File
@@ -24,8 +24,8 @@ use kvdb::{KeyValueDB, DBTransaction};
use client_api::blockchain::{well_known_cache_keys::{self, Id as CacheKeyId}, Cache as BlockchainCache};
use sp_blockchain::Result as ClientResult;
use codec::{Encode, Decode};
use sr_primitives::generic::BlockId;
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero};
use sp_runtime::generic::BlockId;
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero};
use crate::utils::{self, COLUMN_META, db_err};
use self::list_cache::{ListCache, PruningStrategy};
+5 -5
View File
@@ -53,11 +53,11 @@ use trie::{MemoryDB, PrefixedMemoryDB, prefixed_key};
use parking_lot::{Mutex, RwLock};
use primitives::{H256, Blake2Hasher, ChangesTrieConfiguration, convert_hash, traits::CodeExecutor};
use primitives::storage::well_known_keys;
use sr_primitives::{
use sp_runtime::{
generic::{BlockId, DigestItem}, Justification, StorageOverlay, ChildrenStorageOverlay,
BuildStorage,
};
use sr_primitives::traits::{
use sp_runtime::traits::{
Block as BlockT, Header as HeaderT, NumberFor, Zero, One, SaturatedConversion
};
use executor::RuntimeInfo;
@@ -1561,8 +1561,8 @@ mod tests {
use crate::columns;
use client_api::backend::{Backend as BTrait, BlockImportOperation as Op};
use client::blockchain::Backend as BLBTrait;
use sr_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
use sr_primitives::traits::{Hash, BlakeTwo256};
use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
use sp_runtime::traits::{Hash, BlakeTwo256};
use state_machine::{TrieMut, TrieDBMut, ChangesTrieRootsStorage, ChangesTrieStorage};
use sp_blockchain::{lowest_common_ancestor, tree_route};
@@ -1593,7 +1593,7 @@ mod tests {
changes: Vec<(Vec<u8>, Vec<u8>)>,
extrinsics_root: H256,
) -> H256 {
use sr_primitives::testing::Digest;
use sp_runtime::testing::Digest;
let (changes_root, changes_trie_update) = prepare_changes(changes);
let digest = Digest {
logs: vec![
+4 -4
View File
@@ -36,8 +36,8 @@ use sp_blockchain::{
use client::light::blockchain::Storage as LightBlockchainStorage;
use codec::{Decode, Encode};
use primitives::Blake2Hasher;
use sr_primitives::generic::{DigestItem, BlockId};
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor};
use sp_runtime::generic::{DigestItem, BlockId};
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor};
use crate::cache::{DbCacheSync, DbCache, ComplexBlockId, EntryType as CacheEntryType};
use crate::utils::{self, meta_keys, Meta, db_err, read_db, block_id_to_lookup_key, read_meta};
use crate::DatabaseSettings;
@@ -560,8 +560,8 @@ fn cht_key<N: TryInto<u32>>(cht_type: u8, block: N) -> ClientResult<[u8; 5]> {
#[cfg(test)]
pub(crate) mod tests {
use client::cht;
use sr_primitives::generic::DigestItem;
use sr_primitives::testing::{H256 as Hash, Header, Block as RawBlock, ExtrinsicWrapper};
use sp_runtime::generic::DigestItem;
use sp_runtime::testing::{H256 as Hash, Header, Block as RawBlock, ExtrinsicWrapper};
use sp_blockchain::{lowest_common_ancestor, tree_route};
use super::*;
+3 -3
View File
@@ -21,7 +21,7 @@ use std::sync::Arc;
use parking_lot::{Mutex, RwLock, RwLockUpgradableReadGuard};
use linked_hash_map::{LinkedHashMap, Entry};
use hash_db::Hasher;
use sr_primitives::traits::{Block as BlockT, Header};
use sp_runtime::traits::{Block as BlockT, Header};
use primitives::hexdisplay::HexDisplay;
use state_machine::{backend::Backend as StateBackend, TrieBackend};
use log::trace;
@@ -596,7 +596,7 @@ impl<H: Hasher, S: StateBackend<H>, B: BlockT> StateBackend<H> for CachingState<
#[cfg(test)]
mod tests {
use super::*;
use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
use state_machine::backend::InMemory;
use primitives::Blake2Hasher;
@@ -844,7 +844,7 @@ mod qc {
use quickcheck::{quickcheck, TestResult, Arbitrary};
use super::*;
use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
use state_machine::backend::InMemory;
use primitives::Blake2Hasher;
+4 -4
View File
@@ -27,8 +27,8 @@ use log::debug;
use codec::Decode;
use trie::DBValue;
use sr_primitives::generic::BlockId;
use sr_primitives::traits::{
use sp_runtime::generic::BlockId;
use sp_runtime::traits::{
Block as BlockT, Header as HeaderT, Zero,
UniqueSaturatedFrom, UniqueSaturatedInto,
};
@@ -184,7 +184,7 @@ pub fn block_id_to_lookup_key<Block>(
id: BlockId<Block>
) -> Result<Option<Vec<u8>>, sp_blockchain::Error> where
Block: BlockT,
::sr_primitives::traits::NumberFor<Block>: UniqueSaturatedFrom<u64> + UniqueSaturatedInto<u64>,
::sp_runtime::traits::NumberFor<Block>: UniqueSaturatedFrom<u64> + UniqueSaturatedInto<u64>,
{
let res = match id {
BlockId::Number(n) => db.get(
@@ -357,7 +357,7 @@ pub fn read_meta<Block>(db: &dyn KeyValueDB, col_meta: Option<u32>, col_header:
#[cfg(test)]
mod tests {
use super::*;
use sr_primitives::testing::{Block as RawBlock, ExtrinsicWrapper};
use sp_runtime::testing::{Block as RawBlock, ExtrinsicWrapper};
type Block = RawBlock<ExtrinsicWrapper<u32>>;
#[test]