Refactor and timestamp test

This commit is contained in:
Gav
2018-01-19 08:49:38 +01:00
parent f179adbc4e
commit ba0d71a551
9 changed files with 110 additions and 72 deletions
@@ -1,5 +1,7 @@
use runtime_support::{NoError, Externalities};
use std::collections::HashMap;
use primitives::AccountID;
use statichex::StaticHexInto;
#[derive(Debug, Default)]
pub struct TestExternalities {
@@ -20,6 +22,20 @@ impl Externalities for TestExternalities {
fn chain_id(&self) -> u64 { 42 }
}
#[macro_export]
macro_rules! map {
($( $name:expr => $value:expr ),*) => (
vec![ $( ( $name, $value ) ),* ].into_iter().collect()
)
}
pub fn one() -> AccountID {
"2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee".convert()
}
pub fn two() -> AccountID {
"d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a".convert()
}
pub struct HexDisplay<'a>(&'a [u8]);
impl<'a> HexDisplay<'a> {