reorganize native-support exports

This commit is contained in:
Robert Habermeier
2018-01-23 16:51:04 +01:00
parent 3402f169a7
commit ce5f4da907
14 changed files with 53 additions and 37 deletions
@@ -16,7 +16,7 @@
//! Conensus module for runtime; manages the authority set ready for the native code.
use runtime_support::Vec;
use runtime_support::vec::Vec;
use storable::StorageVec;
use primitives::SessionKey;
@@ -17,7 +17,7 @@
//! Session manager: is told the validators and allows them to manage their session keys for the
//! consensus module.
use runtime_support::Vec;
use runtime_support::vec::Vec;
use keyedvec::KeyedVec;
use storable::{kill, Storable, StorageVec};
use primitives::{AccountID, SessionKey, BlockNumber};
@@ -16,7 +16,7 @@
//! Staking manager: Handles balances and periodically determines the best set of validators.
use runtime_support::Vec;
use runtime_support::vec::Vec;
use keyedvec::KeyedVec;
use storable::{Storable, StorageVec};
use primitives::{BlockNumber, AccountID};
@@ -18,7 +18,8 @@
//! and depositing logs.
use primitives::{Block, BlockNumber, Hash, UncheckedTransaction, TxOrder, Hashable};
use runtime_support::{Vec, swap};
use runtime_support::mem;
use runtime_support::vec::Vec;
use storable::Storable;
use keyedvec::KeyedVec;
use environment::with_env;
@@ -46,7 +47,7 @@ pub fn execute_block(mut block: Block) {
// populate environment from header.
with_env(|e| {
e.block_number = block.header.number;
swap(&mut e.digest, &mut block.header.digest);
mem::swap(&mut e.digest, &mut block.header.digest);
e.next_log_index = 0;
});