mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 04:11:07 +00:00
Refactor sr_primitives. (#3214)
* refactor sr_primitives. * Fix try build error. * Line-width * Ui test. * Final fixes. * Fix build again. * bring back ui test. * Fix unsigned import. * Another ui fix. * Also refactor substrate-primitives * Fix benchmarks. * Fix doc test. * fix doc tests
This commit is contained in:
committed by
Bastian Köcher
parent
cf80af9255
commit
79feb23a22
@@ -27,8 +27,8 @@
|
||||
|
||||
use rstd::prelude::*;
|
||||
use parity_codec::{Encode, Decode};
|
||||
use primitives::KeyTypeId;
|
||||
use primitives::traits::{Convert, OpaqueKeys, Hash as HashT};
|
||||
use sr_primitives::KeyTypeId;
|
||||
use sr_primitives::traits::{Convert, OpaqueKeys, Hash as HashT};
|
||||
use srml_support::{
|
||||
StorageValue, StorageMap, decl_module, decl_storage,
|
||||
};
|
||||
@@ -312,8 +312,8 @@ impl<T: Trait, D: AsRef<[u8]>> srml_support::traits::KeyOwnerProofSystem<(KeyTyp
|
||||
mod tests {
|
||||
use super::*;
|
||||
use runtime_io::with_externalities;
|
||||
use substrate_primitives::Blake2Hasher;
|
||||
use primitives::{
|
||||
use primitives::Blake2Hasher;
|
||||
use sr_primitives::{
|
||||
traits::OnInitialize,
|
||||
testing::{UintAuthorityId, UINT_DUMMY_KEY},
|
||||
};
|
||||
|
||||
@@ -121,9 +121,9 @@
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData, ops::{Sub, Rem}};
|
||||
use parity_codec::Decode;
|
||||
use primitives::KeyTypeId;
|
||||
use primitives::weights::SimpleDispatchInfo;
|
||||
use primitives::traits::{Convert, Zero, Member, OpaqueKeys, TypedKey};
|
||||
use sr_primitives::KeyTypeId;
|
||||
use sr_primitives::weights::SimpleDispatchInfo;
|
||||
use sr_primitives::traits::{Convert, Zero, Member, OpaqueKeys, TypedKey};
|
||||
use srml_support::{
|
||||
dispatch::Result, ConsensusEngineId, StorageValue, StorageDoubleMap, for_each_tuple,
|
||||
decl_module, decl_event, decl_storage,
|
||||
@@ -317,8 +317,8 @@ decl_storage! {
|
||||
add_extra_genesis {
|
||||
config(keys): Vec<(T::ValidatorId, T::Keys)>;
|
||||
build(|
|
||||
storage: &mut primitives::StorageOverlay,
|
||||
_: &mut primitives::ChildrenStorageOverlay,
|
||||
storage: &mut sr_primitives::StorageOverlay,
|
||||
_: &mut sr_primitives::ChildrenStorageOverlay,
|
||||
config: &GenesisConfig<T>
|
||||
| {
|
||||
runtime_io::with_storage(storage, || {
|
||||
@@ -562,8 +562,8 @@ mod tests {
|
||||
use super::*;
|
||||
use srml_support::assert_ok;
|
||||
use runtime_io::with_externalities;
|
||||
use substrate_primitives::Blake2Hasher;
|
||||
use primitives::{
|
||||
use primitives::Blake2Hasher;
|
||||
use sr_primitives::{
|
||||
traits::OnInitialize,
|
||||
testing::UintAuthorityId,
|
||||
};
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use super::*;
|
||||
use std::cell::RefCell;
|
||||
use srml_support::{impl_outer_origin, parameter_types};
|
||||
use substrate_primitives::H256;
|
||||
use primitives::{
|
||||
use primitives::H256;
|
||||
use sr_primitives::{
|
||||
Perbill,
|
||||
traits::{BlakeTwo256, IdentityLookup, ConvertInto},
|
||||
testing::{Header, UintAuthorityId}
|
||||
@@ -159,7 +159,7 @@ impl Trait for Test {
|
||||
#[cfg(feature = "historical")]
|
||||
impl crate::historical::Trait for Test {
|
||||
type FullIdentification = u64;
|
||||
type FullIdentificationOf = primitives::traits::ConvertInto;
|
||||
type FullIdentificationOf = sr_primitives::traits::ConvertInto;
|
||||
}
|
||||
|
||||
pub type System = system::Module<Test>;
|
||||
|
||||
Reference in New Issue
Block a user