Build fixes for Ethash.

This commit is contained in:
Gav Wood 2016-01-08 12:27:00 +01:00
parent 3cbaf64c51
commit 1c71640777
3 changed files with 4 additions and 2 deletions

View File

@ -11,11 +11,11 @@ pub struct Ethash {
impl Ethash { impl Ethash {
pub fn new_boxed(spec: Spec) -> Box<Engine> { pub fn new_boxed(spec: Spec) -> Box<Engine> {
Box::new(NullEngine{spec: spec}) Box::new(Ethash{spec: spec})
} }
} }
impl Engine for NullEngine { impl Engine for Ethash {
fn name(&self) -> &str { "Ethash" } fn name(&self) -> &str { "Ethash" }
fn spec(&self) -> &Spec { &self.spec } fn spec(&self) -> &Spec { &self.spec }
fn evm_schedule(&self, _env_info: &EnvInfo) -> EvmSchedule { EvmSchedule::new_frontier() } fn evm_schedule(&self, _env_info: &EnvInfo) -> EvmSchedule { EvmSchedule::new_frontier() }

View File

@ -105,3 +105,4 @@ pub mod genesis;
pub mod views; pub mod views;
pub mod blockchain; pub mod blockchain;
pub mod extras; pub mod extras;
pub mod ethash;

View File

@ -17,6 +17,7 @@ use account::*;
use engine::Engine; use engine::Engine;
use builtin::Builtin; use builtin::Builtin;
use null_engine::NullEngine; use null_engine::NullEngine;
use ethash::Ethash;
use denominations::*; use denominations::*;
use header::*; use header::*;