mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
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:
committed by
GitHub
parent
40f6d05a4c
commit
927e13c13a
@@ -21,7 +21,7 @@ use runtime_io::hashing::{blake2_256, twox_128};
|
||||
use super::{AuthorityId, AccountId, WASM_BINARY, system};
|
||||
use codec::{Encode, KeyedVec, Joiner};
|
||||
use primitives::{ChangesTrieConfiguration, map, storage::well_known_keys};
|
||||
use sr_primitives::traits::{Block as BlockT, Hash as HashT, Header as HeaderT};
|
||||
use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT};
|
||||
|
||||
/// Configuration of a general Substrate test genesis block.
|
||||
pub struct GenesisConfig {
|
||||
@@ -105,7 +105,7 @@ pub fn insert_genesis_block(
|
||||
let state_root = <<<crate::Block as BlockT>::Header as HeaderT>::Hashing as HashT>::trie_root(
|
||||
storage.0.clone().into_iter().chain(child_roots).collect()
|
||||
);
|
||||
let block: crate::Block = substrate_client::genesis::construct_genesis_block(state_root);
|
||||
let block: crate::Block = sc_client::genesis::construct_genesis_block(state_root);
|
||||
let genesis_hash = block.header.hash();
|
||||
storage.0.extend(additional_storage_with_genesis(&block));
|
||||
genesis_hash
|
||||
|
||||
@@ -29,11 +29,11 @@ use primitives::{Blake2Hasher, OpaqueMetadata, RuntimeDebug};
|
||||
use app_crypto::{ed25519, sr25519, RuntimeAppPublic};
|
||||
pub use app_crypto;
|
||||
use trie_db::{TrieMut, Trie};
|
||||
use substrate_trie::PrefixedMemoryDB;
|
||||
use substrate_trie::trie_types::{TrieDB, TrieDBMut};
|
||||
use sp_trie::PrefixedMemoryDB;
|
||||
use sp_trie::trie_types::{TrieDB, TrieDBMut};
|
||||
|
||||
use sr_api::{decl_runtime_apis, impl_runtime_apis};
|
||||
use sr_primitives::{
|
||||
use sp_api::{decl_runtime_apis, impl_runtime_apis};
|
||||
use sp_runtime::{
|
||||
ApplyExtrinsicResult, create_runtime_str, Perbill, impl_opaque_keys,
|
||||
transaction_validity::{
|
||||
TransactionValidity, ValidTransaction, TransactionValidityError, InvalidTransaction,
|
||||
@@ -124,7 +124,7 @@ impl BlindCheckable for Extrinsic {
|
||||
match self {
|
||||
Extrinsic::AuthoritiesChange(new_auth) => Ok(Extrinsic::AuthoritiesChange(new_auth)),
|
||||
Extrinsic::Transfer(transfer, signature) => {
|
||||
if sr_primitives::verify_encoded_lazy(&signature, &transfer, &transfer.from) {
|
||||
if sp_runtime::verify_encoded_lazy(&signature, &transfer, &transfer.from) {
|
||||
Ok(Extrinsic::Transfer(transfer, signature))
|
||||
} else {
|
||||
Err(InvalidTransaction::BadProof.into())
|
||||
@@ -173,17 +173,17 @@ pub type BlockNumber = u64;
|
||||
/// Index of a transaction.
|
||||
pub type Index = u64;
|
||||
/// The item of a block digest.
|
||||
pub type DigestItem = sr_primitives::generic::DigestItem<H256>;
|
||||
pub type DigestItem = sp_runtime::generic::DigestItem<H256>;
|
||||
/// The digest of a block.
|
||||
pub type Digest = sr_primitives::generic::Digest<H256>;
|
||||
pub type Digest = sp_runtime::generic::Digest<H256>;
|
||||
/// A test block.
|
||||
pub type Block = sr_primitives::generic::Block<Header, Extrinsic>;
|
||||
pub type Block = sp_runtime::generic::Block<Header, Extrinsic>;
|
||||
/// A test block's header.
|
||||
pub type Header = sr_primitives::generic::Header<BlockNumber, BlakeTwo256>;
|
||||
pub type Header = sp_runtime::generic::Header<BlockNumber, BlakeTwo256>;
|
||||
|
||||
/// Run whatever tests we have.
|
||||
pub fn run_tests(mut input: &[u8]) -> Vec<u8> {
|
||||
use sr_primitives::print;
|
||||
use sp_runtime::print;
|
||||
|
||||
print("run_tests...");
|
||||
let block = Block::decode(&mut input).unwrap();
|
||||
@@ -457,7 +457,7 @@ static mut MUTABLE_STATIC: u64 = 32;
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "std")] {
|
||||
impl_runtime_apis! {
|
||||
impl sr_api::Core<Block> for Runtime {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
version()
|
||||
}
|
||||
@@ -471,7 +471,7 @@ cfg_if! {
|
||||
}
|
||||
}
|
||||
|
||||
impl sr_api::Metadata<Block> for Runtime {
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
unimplemented!()
|
||||
}
|
||||
@@ -642,7 +642,7 @@ cfg_if! {
|
||||
}
|
||||
} else {
|
||||
impl_runtime_apis! {
|
||||
impl sr_api::Core<Block> for Runtime {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
version()
|
||||
}
|
||||
@@ -656,7 +656,7 @@ cfg_if! {
|
||||
}
|
||||
}
|
||||
|
||||
impl sr_api::Metadata<Block> for Runtime {
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
unimplemented!()
|
||||
}
|
||||
@@ -937,7 +937,7 @@ mod tests {
|
||||
DefaultTestClientBuilderExt, TestClientBuilder,
|
||||
runtime::TestAPI,
|
||||
};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::ProvideRuntimeApi,
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ use runtime_io::{
|
||||
};
|
||||
use runtime_support::storage;
|
||||
use runtime_support::{decl_storage, decl_module};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
traits::{Hash as HashT, BlakeTwo256, Header as _}, generic, ApplyExtrinsicResult,
|
||||
transaction_validity::{
|
||||
TransactionValidity, ValidTransaction, InvalidTransaction, TransactionValidityError,
|
||||
@@ -257,7 +257,7 @@ pub fn finalize_block() -> Header {
|
||||
|
||||
#[inline(always)]
|
||||
fn check_signature(utx: &Extrinsic) -> Result<(), TransactionValidityError> {
|
||||
use sr_primitives::traits::BlindCheckable;
|
||||
use sp_runtime::traits::BlindCheckable;
|
||||
utx.clone().check().map_err(|_| InvalidTransaction::BadProof.into()).map(|_| ())
|
||||
}
|
||||
|
||||
@@ -325,9 +325,9 @@ fn info_expect_equal_hash(given: &Hash, expected: &Hash) {
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn info_expect_equal_hash(given: &Hash, expected: &Hash) {
|
||||
if given != expected {
|
||||
sr_primitives::print("Hash not equal");
|
||||
sr_primitives::print(given.as_bytes());
|
||||
sr_primitives::print(expected.as_bytes());
|
||||
sp_runtime::print("Hash not equal");
|
||||
sp_runtime::print(given.as_bytes());
|
||||
sp_runtime::print(expected.as_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ mod tests {
|
||||
use substrate_test_runtime_client::{AccountKeyring, Sr25519Keyring};
|
||||
use crate::{Header, Transfer, WASM_BINARY};
|
||||
use primitives::{NeverNativeValue, map, traits::CodeExecutor};
|
||||
use substrate_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance};
|
||||
use sc_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance};
|
||||
use runtime_io::hashing::twox_128;
|
||||
|
||||
// Declare an instance of the native executor dispatch for the test runtime.
|
||||
|
||||
Reference in New Issue
Block a user