mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 19:41:05 +00:00
combine relay chain primitives into one module
This commit is contained in:
@@ -40,8 +40,7 @@ pub mod runtime;
|
||||
|
||||
use runtime_std::prelude::*;
|
||||
use codec::Slicable;
|
||||
use primitives::transaction::UncheckedTransaction;
|
||||
use primitives::block::{Header, Block};
|
||||
use primitives::relay::{Header, Block, UncheckedTransaction};
|
||||
|
||||
/// Execute a block, with `input` being the canonical serialisation of the block. Returns the
|
||||
/// empty vector.
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::collections::HashMap;
|
||||
use runtime_std::twox_128;
|
||||
use codec::{KeyedVec, Joiner};
|
||||
use support::Hashable;
|
||||
use primitives::block::{Number as BlockNumber, Block};
|
||||
use primitives::relay::{Number as BlockNumber, Block};
|
||||
use primitives::AccountId;
|
||||
use runtime::staking::Balance;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ use runtime_std::prelude::*;
|
||||
use codec::KeyedVec;
|
||||
use support::storage;
|
||||
use primitives::{AccountId, Hash, BlockNumber};
|
||||
use primitives::transaction::Proposal;
|
||||
use primitives::relay::Proposal;
|
||||
use runtime::{staking, system, session};
|
||||
|
||||
const APPROVALS_REQUIRED: &[u8] = b"gov:apr";
|
||||
@@ -95,7 +95,7 @@ pub mod privileged {
|
||||
|
||||
pub mod internal {
|
||||
use super::*;
|
||||
use primitives::transaction::{Proposal, InternalFunction};
|
||||
use primitives::relay::{Proposal, InternalFunction};
|
||||
|
||||
/// Current era is ending; we should finish up any proposals.
|
||||
pub fn end_of_an_era() {
|
||||
@@ -150,7 +150,7 @@ mod tests {
|
||||
use codec::{KeyedVec, Joiner};
|
||||
use support::{one, two, with_env};
|
||||
use primitives::AccountId;
|
||||
use primitives::transaction::InternalFunction;
|
||||
use primitives::relay::InternalFunction;
|
||||
use runtime::{staking, session};
|
||||
|
||||
fn new_test_ext() -> TestExternalities {
|
||||
|
||||
@@ -21,9 +21,8 @@ use runtime_std::prelude::*;
|
||||
use runtime_std::{mem, storage_root, enumerated_trie_root};
|
||||
use codec::{KeyedVec, Slicable};
|
||||
use support::{Hashable, storage, with_env};
|
||||
use primitives::{AccountId, Hash, TxOrder};
|
||||
use primitives::block::{Block, Header, Number as BlockNumber};
|
||||
use primitives::transaction::{UncheckedTransaction, Function};
|
||||
use primitives::{AccountId, Hash, TxOrder, BlockNumber};
|
||||
use primitives::relay::{Block, Header, UncheckedTransaction, Function, Log};
|
||||
use runtime::{staking, session};
|
||||
|
||||
const NONCE_OF: &[u8] = b"sys:non:";
|
||||
@@ -55,7 +54,7 @@ pub mod internal {
|
||||
struct CheckedTransaction(UncheckedTransaction);
|
||||
|
||||
/// Deposits a log and ensures it matches the blocks log data.
|
||||
pub fn deposit_log(log: ::primitives::block::Log) {
|
||||
pub fn deposit_log(log: Log) {
|
||||
with_env(|e| e.digest.logs.push(log));
|
||||
}
|
||||
|
||||
@@ -222,8 +221,7 @@ mod tests {
|
||||
use runtime_std::{with_externalities, twox_128, TestExternalities};
|
||||
use codec::{Joiner, KeyedVec, Slicable};
|
||||
use support::{StaticHexInto, HexDisplay, one, two};
|
||||
use primitives::transaction::{UncheckedTransaction, Transaction, Function};
|
||||
use primitives::block::{Header, Digest};
|
||||
use primitives::relay::{Header, Digest, UncheckedTransaction, Transaction, Function};
|
||||
use runtime::staking;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -21,7 +21,7 @@ use runtime_std::mem;
|
||||
use runtime_std::cell::RefCell;
|
||||
use runtime_std::rc::Rc;
|
||||
|
||||
use primitives::block::{Number as BlockNumber, Digest};
|
||||
use primitives::relay::{BlockNumber, Digest};
|
||||
use primitives::Hash;
|
||||
|
||||
#[derive(Default)]
|
||||
|
||||
@@ -338,7 +338,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn proposals_can_be_stored() {
|
||||
use primitives::transaction::{Proposal, InternalFunction};
|
||||
use primitives::relay::{Proposal, InternalFunction};
|
||||
let mut t = TestExternalities { storage: HashMap::new(), };
|
||||
with_externalities(&mut t, || {
|
||||
let x = Proposal {
|
||||
|
||||
Reference in New Issue
Block a user