2015-12-20 21:45:43 +01:00
|
|
|
use engine::Engine;
|
|
|
|
use spec::Spec;
|
2016-01-11 16:28:30 +01:00
|
|
|
use evm::Schedule;
|
2015-12-20 21:45:43 +01:00
|
|
|
use env_info::EnvInfo;
|
|
|
|
|
|
|
|
/// An engine which does not provide any consensus mechanism.
|
|
|
|
pub struct NullEngine {
|
|
|
|
spec: Spec,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl NullEngine {
|
|
|
|
pub fn new_boxed(spec: Spec) -> Box<Engine> {
|
|
|
|
Box::new(NullEngine{spec: spec})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Engine for NullEngine {
|
|
|
|
fn name(&self) -> &str { "NullEngine" }
|
|
|
|
fn spec(&self) -> &Spec { &self.spec }
|
2016-01-11 16:28:30 +01:00
|
|
|
fn schedule(&self, _env_info: &EnvInfo) -> Schedule { Schedule::new_frontier() }
|
2015-12-20 21:45:43 +01:00
|
|
|
}
|