Split internal sealing from work preparation (#2071)

* separate block preparation methods

* Split internal sealing from work sealing, add cli option

* replace cli with engine method, simplify

* More docs about sealing types. Bypass work in external txs.

* split requires_reseal, add test and new test miner
This commit is contained in:
keorn
2016-09-13 15:09:07 +02:00
committed by Arkadiy Paronyan
parent 83ddce011d
commit 341e06481e
5 changed files with 159 additions and 115 deletions

View File

@@ -260,6 +260,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)]