mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Rename: primitives/sr-io -> primitives/sp-io (#4328)
* primitives/sr-io -> primitives/io * fix * rename * runtime-io -> sp-io * git mv * fix ci * remove package name * fix * fix * try minimizing diff * try minimizing diff again * try minimizing diff again
This commit is contained in:
committed by
Bastian Köcher
parent
1f84d6d41d
commit
4f2cdb20c1
@@ -21,7 +21,7 @@ offchain-primitives = { package = "sp-offchain", path = "../../../primitives/off
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
sp-std = { path = "../../../primitives/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 }
|
||||
sp-io = { path = "../../../primitives/io", default-features = false }
|
||||
runtime_support = { package = "frame-support", path = "../../../frame/support", default-features = false }
|
||||
runtime_version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
@@ -65,7 +65,7 @@ std = [
|
||||
"primitives/std",
|
||||
"sp-std/std",
|
||||
"runtime-interface/std",
|
||||
"runtime_io/std",
|
||||
"sp-io/std",
|
||||
"runtime_support/std",
|
||||
"runtime_version/std",
|
||||
"serde",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Tool for creating the genesis block.
|
||||
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use runtime_io::hashing::{blake2_256, twox_128};
|
||||
use sp_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};
|
||||
|
||||
@@ -624,7 +624,7 @@ cfg_if! {
|
||||
impl offchain_primitives::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(block: u64) {
|
||||
let ex = Extrinsic::IncludeData(block.encode());
|
||||
runtime_io::offchain::submit_transaction(ex.encode()).unwrap();
|
||||
sp_io::offchain::submit_transaction(ex.encode()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -840,7 +840,7 @@ cfg_if! {
|
||||
impl offchain_primitives::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(block: u64) {
|
||||
let ex = Extrinsic::IncludeData(block.encode());
|
||||
runtime_io::offchain::submit_transaction(ex.encode()).unwrap()
|
||||
sp_io::offchain::submit_transaction(ex.encode()).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -891,10 +891,10 @@ fn test_sr25519_crypto() -> (sr25519::AppSignature, sr25519::AppPublic) {
|
||||
|
||||
fn test_read_storage() {
|
||||
const KEY: &[u8] = b":read_storage";
|
||||
runtime_io::storage::set(KEY, b"test");
|
||||
sp_io::storage::set(KEY, b"test");
|
||||
|
||||
let mut v = [0u8; 4];
|
||||
let r = runtime_io::storage::read(
|
||||
let r = sp_io::storage::read(
|
||||
KEY,
|
||||
&mut v,
|
||||
0
|
||||
@@ -903,7 +903,7 @@ fn test_read_storage() {
|
||||
assert_eq!(&v, b"test");
|
||||
|
||||
let mut v = [0u8; 4];
|
||||
let r = runtime_io::storage::read(KEY, &mut v, 8);
|
||||
let r = sp_io::storage::read(KEY, &mut v, 8);
|
||||
assert_eq!(r, Some(4));
|
||||
assert_eq!(&v, &[0, 0, 0, 0]);
|
||||
}
|
||||
@@ -911,10 +911,10 @@ fn test_read_storage() {
|
||||
fn test_read_child_storage() {
|
||||
const CHILD_KEY: &[u8] = b":child_storage:default:read_child_storage";
|
||||
const KEY: &[u8] = b":read_child_storage";
|
||||
runtime_io::storage::child_set(CHILD_KEY, KEY, b"test");
|
||||
sp_io::storage::child_set(CHILD_KEY, KEY, b"test");
|
||||
|
||||
let mut v = [0u8; 4];
|
||||
let r = runtime_io::storage::child_read(
|
||||
let r = sp_io::storage::child_read(
|
||||
CHILD_KEY,
|
||||
KEY,
|
||||
&mut v,
|
||||
@@ -924,7 +924,7 @@ fn test_read_child_storage() {
|
||||
assert_eq!(&v, b"test");
|
||||
|
||||
let mut v = [0u8; 4];
|
||||
let r = runtime_io::storage::child_read(CHILD_KEY, KEY, &mut v, 8);
|
||||
let r = sp_io::storage::child_read(CHILD_KEY, KEY, &mut v, 8);
|
||||
assert_eq!(r, Some(4));
|
||||
assert_eq!(&v, &[0, 0, 0, 0]);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! and depositing logs.
|
||||
|
||||
use sp_std::prelude::*;
|
||||
use runtime_io::{
|
||||
use sp_io::{
|
||||
storage::root as storage_root, storage::changes_root as storage_changes_root,
|
||||
hashing::blake2_256,
|
||||
};
|
||||
@@ -335,12 +335,12 @@ fn info_expect_equal_hash(given: &Hash, expected: &Hash) {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use runtime_io::TestExternalities;
|
||||
use sp_io::TestExternalities;
|
||||
use substrate_test_runtime_client::{AccountKeyring, Sr25519Keyring};
|
||||
use crate::{Header, Transfer, WASM_BINARY};
|
||||
use primitives::{NeverNativeValue, map, traits::CodeExecutor};
|
||||
use sc_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance};
|
||||
use runtime_io::hashing::twox_128;
|
||||
use sp_io::hashing::twox_128;
|
||||
|
||||
// Declare an instance of the native executor dispatch for the test runtime.
|
||||
native_executor_instance!(
|
||||
|
||||
Reference in New Issue
Block a user