mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 09:37:55 +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
@@ -19,7 +19,7 @@
|
||||
use codec::{Encode, Decode};
|
||||
use client::backend::AuxStore;
|
||||
use client::error::{Result as ClientResult, Error as ClientError};
|
||||
use runtime_primitives::traits::Header;
|
||||
use sr_primitives::traits::Header;
|
||||
|
||||
const SLOT_HEADER_MAP_KEY: &[u8] = b"slot_header_map";
|
||||
const SLOT_HEADER_START: &[u8] = b"slot_header_start";
|
||||
@@ -153,7 +153,7 @@ pub fn check_equivocation<C, H, P>(
|
||||
mod test {
|
||||
use primitives::{sr25519, Pair};
|
||||
use primitives::hash::H256;
|
||||
use runtime_primitives::testing::{Header as HeaderTest, Digest as DigestTest};
|
||||
use sr_primitives::testing::{Header as HeaderTest, Digest as DigestTest};
|
||||
use test_client;
|
||||
|
||||
use super::{MAX_SLOT_CAPACITY, PRUNING_BOUND, check_equivocation};
|
||||
|
||||
@@ -35,8 +35,8 @@ use consensus_common::{SyncOracle, SelectChain};
|
||||
use futures::{prelude::*, future::{self, Either}, task::Poll};
|
||||
use inherents::{InherentData, InherentDataProviders};
|
||||
use log::{debug, error, info, warn};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{ApiRef, Block as BlockT, ProvideRuntimeApi};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{ApiRef, Block as BlockT, ProvideRuntimeApi};
|
||||
use std::{fmt::Debug, ops::Deref, panic, pin::Pin};
|
||||
|
||||
/// A worker that should be invoked at every new slot.
|
||||
@@ -208,7 +208,7 @@ impl<T: Clone> SlotDuration<T> {
|
||||
.into()
|
||||
}),
|
||||
None => {
|
||||
use runtime_primitives::traits::Zero;
|
||||
use sr_primitives::traits::Zero;
|
||||
let genesis_slot_duration =
|
||||
cb(client.runtime_api(), &BlockId::number(Zero::zero()))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user