23 lines
574 B
Rust
23 lines
574 B
Rust
|
use engine::Engine;
|
||
|
use spec::Spec;
|
||
|
use evm_schedule::EvmSchedule;
|
||
|
use env_info::EnvInfo;
|
||
|
|
||
|
/// Engine using Ethash proof-of-work consensus algorithm, suitable for Ethereum
|
||
|
/// mainnet chains in the Olympic, Frontier and Homestead eras.
|
||
|
pub struct Ethash {
|
||
|
spec: Spec,
|
||
|
}
|
||
|
|
||
|
impl Ethash {
|
||
|
pub fn new_boxed(spec: Spec) -> Box<Engine> {
|
||
|
Box::new(NullEngine{spec: spec})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl Engine for NullEngine {
|
||
|
fn name(&self) -> &str { "Ethash" }
|
||
|
fn spec(&self) -> &Spec { &self.spec }
|
||
|
fn evm_schedule(&self, _env_info: &EnvInfo) -> EvmSchedule { EvmSchedule::new_frontier() }
|
||
|
}
|