Merge remote-tracking branch 'parity/master' into bft

Conflicts:
	Cargo.lock
This commit is contained in:
keorn
2016-09-27 12:37:43 +02:00
168 changed files with 5255 additions and 2166 deletions

View File

@@ -184,7 +184,7 @@ impl Spec {
let r = Rlp::new(&seal);
(0..self.seal_fields).map(|i| r.at(i).as_raw().to_vec()).collect()
});
return header;
header
}
/// Compose the genesis block for this chain.
@@ -261,6 +261,11 @@ impl Spec {
pub fn new_null() -> Self {
Spec::load(include_bytes!("../../res/null.json") as &[u8]).expect("null.json is invalid")
}
/// Create a new Spec with InstantSeal consensus which does internal sealing (not requiring work).
pub fn new_test_instant() -> Self {
Spec::load(include_bytes!("../../res/instant_seal.json") as &[u8]).expect("instant_seal.json is invalid")
}
}
#[cfg(test)]
@@ -274,7 +279,7 @@ mod tests {
// https://github.com/ethcore/parity/issues/1840
#[test]
fn test_load_empty() {
assert!(Spec::load(&vec![] as &[u8]).is_err());
assert!(Spec::load(&[] as &[u8]).is_err());
}
#[test]