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:
Weiliang Li
2019-12-11 00:08:35 +09:00
committed by Bastian Köcher
parent 1f84d6d41d
commit 4f2cdb20c1
134 changed files with 312 additions and 315 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ use crate::exec::StorageKey;
use sp_std::cell::RefCell;
use sp_std::collections::btree_map::{BTreeMap, Entry};
use sp_std::prelude::*;
use runtime_io::hashing::blake2_256;
use sp_io::hashing::blake2_256;
use sp_runtime::traits::{Bounded, Zero};
use support::traits::{Currency, Get, Imbalance, SignedImbalance, UpdateBalanceOutcome};
use support::{storage::child, StorageMap};
+2 -2
View File
@@ -111,7 +111,7 @@ use serde::{Serialize, Deserialize};
use primitives::crypto::UncheckedFrom;
use sp_std::{prelude::*, marker::PhantomData, fmt::Debug};
use codec::{Codec, Encode, Decode};
use runtime_io::hashing::blake2_256;
use sp_io::hashing::blake2_256;
use sp_runtime::{
traits::{Hash, StaticLookup, Zero, MaybeSerializeDeserialize, Member, SignedExtension},
transaction_validity::{
@@ -803,7 +803,7 @@ impl<T: Trait> Module<T> {
let tombstone = <TombstoneContractInfo<T>>::new(
// This operation is cheap enough because last_write (delta not included)
// is not this block as it has been checked earlier.
&runtime_io::storage::child_root(&origin_contract.trie_id)[..],
&sp_io::storage::child_root(&origin_contract.trie_id)[..],
code_hash,
);
+3 -3
View File
@@ -99,7 +99,7 @@ fn try_evict_or_and_pay_rent<T: Trait>(
if balance < subsistence_threshold {
// The contract cannot afford to leave a tombstone, so remove the contract info altogether.
<ContractInfoOf<T>>::remove(account);
runtime_io::storage::child_storage_kill(&contract.trie_id);
sp_io::storage::child_storage_kill(&contract.trie_id);
return (RentOutcome::Evicted, None);
}
@@ -146,7 +146,7 @@ fn try_evict_or_and_pay_rent<T: Trait>(
// threshold, so it leaves a tombstone.
// Note: this operation is heavy.
let child_storage_root = runtime_io::storage::child_root(&contract.trie_id);
let child_storage_root = sp_io::storage::child_root(&contract.trie_id);
let tombstone = <TombstoneContractInfo<T>>::new(
&child_storage_root[..],
@@ -155,7 +155,7 @@ fn try_evict_or_and_pay_rent<T: Trait>(
let tombstone_info = ContractInfo::Tombstone(tombstone);
<ContractInfoOf<T>>::insert(account, &tombstone_info);
runtime_io::storage::child_storage_kill(&contract.trie_id);
sp_io::storage::child_storage_kill(&contract.trie_id);
return (RentOutcome::Evicted, Some(tombstone_info));
}
+2 -2
View File
@@ -268,7 +268,7 @@ impl ExtBuilder {
INSTANTIATION_FEE.with(|v| *v.borrow_mut() = self.instantiation_fee);
BLOCK_GAS_LIMIT.with(|v| *v.borrow_mut() = self.block_gas_limit);
}
pub fn build(self) -> runtime_io::TestExternalities {
pub fn build(self) -> sp_io::TestExternalities {
self.set_associated_consts();
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
balances::GenesisConfig::<Test> {
@@ -282,7 +282,7 @@ impl ExtBuilder {
},
gas_price: self.gas_price,
}.assimilate_storage(&mut t).unwrap();
runtime_io::TestExternalities::new(t)
sp_io::TestExternalities::new(t)
}
}