mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 15:57:55 +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
@@ -6,41 +6,41 @@ edition = "2018"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto", default-features = false }
|
||||
aura-primitives = { package = "substrate-consensus-aura-primitives", path = "../../../primitives/consensus/aura", default-features = false }
|
||||
babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe", default-features = false }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api", default-features = false }
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto", default-features = false }
|
||||
aura-primitives = { package = "sp-consensus-aura", path = "../../../primitives/consensus/aura", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe", default-features = false }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api", default-features = false }
|
||||
cfg-if = "0.1.10"
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
executive = { package = "frame-executive", path = "../../../frame/executive", default-features = false }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false }
|
||||
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring", optional = true }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false }
|
||||
keyring = { package = "sp-keyring", path = "../../../primitives/keyring", optional = true }
|
||||
log = { version = "0.4.8", optional = true }
|
||||
memory-db = { version = "0.15.2", default-features = false }
|
||||
offchain-primitives = { package = "substrate-offchain-primitives", path = "../../../primitives/offchain", default-features = false}
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
runtime-interface = { package = "substrate-runtime-interface", path = "../../../primitives/runtime-interface", default-features = false}
|
||||
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false}
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
runtime-interface = { package = "sp-runtime-interface", path = "../../../primitives/runtime-interface", default-features = false}
|
||||
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
runtime_support = { package = "frame-support", path = "../../../frame/support", default-features = false }
|
||||
runtime_version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false }
|
||||
runtime_version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
session = { package = "substrate-session", path = "../../../primitives/session", default-features = false }
|
||||
sr-api = { path = "../../../primitives/sr-api", default-features = false }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false }
|
||||
session = { package = "sp-sesssion", path = "../../../primitives/session", default-features = false }
|
||||
sp-api = { path = "../../../primitives/sr-api", default-features = false }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false }
|
||||
pallet-babe = { path = "../../../frame/babe", default-features = false }
|
||||
frame-system = { path = "../../../frame/system", default-features = false }
|
||||
frame-system-rpc-runtime-api = { path = "../../../frame/system/rpc/runtime-api", default-features = false }
|
||||
pallet-timestamp = { path = "../../../frame/timestamp", default-features = false }
|
||||
substrate-client = { path = "../../../client", optional = true }
|
||||
substrate-trie = { path = "../../../primitives/trie", default-features = false }
|
||||
sc-client = { path = "../../../client", optional = true }
|
||||
sp-trie = { path = "../../../primitives/trie", default-features = false }
|
||||
txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false }
|
||||
trie-db = { version = "0.16.0", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-executor = { path = "../../../client/executor" }
|
||||
sc-executor = { path = "../../../client/executor" }
|
||||
substrate-test-runtime-client = { path = "./client" }
|
||||
state_machine = { package = "substrate-state-machine", path = "../../../primitives/state-machine" }
|
||||
state_machine = { package = "sp-state-machine", path = "../../../primitives/state-machine" }
|
||||
|
||||
[build-dependencies]
|
||||
wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" }
|
||||
@@ -70,14 +70,14 @@ std = [
|
||||
"runtime_version/std",
|
||||
"serde",
|
||||
"session/std",
|
||||
"sr-api/std",
|
||||
"sr-primitives/std",
|
||||
"sp-api/std",
|
||||
"sp-runtime/std",
|
||||
"pallet-babe/std",
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"pallet-timestamp/std",
|
||||
"substrate-client",
|
||||
"substrate-trie/std",
|
||||
"sc-client",
|
||||
"sp-trie/std",
|
||||
"txpool-runtime-api/std",
|
||||
"trie-db/std",
|
||||
]
|
||||
|
||||
@@ -5,13 +5,13 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
block-builder = { package = "substrate-block-builder", path = "../../../../client/block-builder" }
|
||||
block-builder = { package = "sc-block-builder", path = "../../../../client/block-builder" }
|
||||
generic-test-client = { package = "substrate-test-client", path = "../../client" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../../../primitives/core" }
|
||||
runtime = { package = "substrate-test-runtime", path = "../../runtime" }
|
||||
sr-primitives = { path = "../../../../primitives/sr-primitives" }
|
||||
sp-runtime = { path = "../../../../primitives/sr-primitives" }
|
||||
sp-blockchain = { path = "../../../../primitives/blockchain" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
client-api = { package = "substrate-client-api", path = "../../../../client/api" }
|
||||
client = { package = "substrate-client", path = "../../../../client/" }
|
||||
client-api = { package = "sc-client-api", path = "../../../../client/api" }
|
||||
client = { package = "sc-client", path = "../../../../client/" }
|
||||
futures = "0.3.1"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Block Builder extensions for tests.
|
||||
|
||||
use runtime;
|
||||
use sr_primitives::traits::ProvideRuntimeApi;
|
||||
use sp_runtime::traits::ProvideRuntimeApi;
|
||||
|
||||
use block_builder::BlockBuilderApi;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ pub use runtime;
|
||||
|
||||
use primitives::sr25519;
|
||||
use runtime::genesismap::{GenesisConfig, additional_storage_with_genesis};
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, NumberFor};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, NumberFor};
|
||||
use client::{
|
||||
light::fetcher::{
|
||||
Fetcher,
|
||||
|
||||
@@ -28,8 +28,8 @@ use crate::{AccountKeyring, ClientExt, TestClientBuilder, TestClientBuilderExt};
|
||||
use generic_test_client::consensus::BlockOrigin;
|
||||
use primitives::Blake2Hasher;
|
||||
use runtime::{self, Transfer};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// helper to test the `leaves` implementation for various backends
|
||||
pub fn test_leaves_for_backend<B: 'static>(backend: Arc<B>) where
|
||||
|
||||
@@ -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