add new test specs

This commit is contained in:
keorn 2016-09-14 11:17:39 +02:00
parent 7f05021075
commit ddb6fec171
1 changed files with 10 additions and 0 deletions

View File

@ -266,6 +266,16 @@ impl Spec {
pub fn new_test_instant() -> Self {
Spec::load(include_bytes!("../../res/instant_seal.json") as &[u8]).expect("instant_seal.json is invalid")
}
/// Create a new Spec with AuthorityRound consensus which does internal sealing (not requiring work).
pub fn new_test_round() -> Self {
Spec::load(include_bytes!("../../res/authority_round.json") as &[u8]).expect("authority_round.json is invalid")
}
/// Create a new Spec with Tendermint consensus which does internal sealing (not requiring work).
pub fn new_test_tendermint() -> Self {
Spec::load(include_bytes!("../../res/tendermint.json") as &[u8]).expect("tendermint.json is invalid")
}
}
#[cfg(test)]