Removed machine abstraction from ethcore (#10791)
This commit is contained in:
@@ -22,7 +22,6 @@ use common_types::encoded;
|
||||
use common_types::header::Header;
|
||||
use common_types::receipt::Receipt;
|
||||
use ethcore::engines::{EthEngine, StateDependentProof};
|
||||
use ethcore::machine::EthereumMachine;
|
||||
use ethereum_types::H256;
|
||||
use futures::future::IntoFuture;
|
||||
|
||||
@@ -49,7 +48,7 @@ pub trait ChainDataFetcher: Send + Sync + 'static {
|
||||
&self,
|
||||
_hash: H256,
|
||||
_engine: Arc<EthEngine>,
|
||||
_checker: Arc<StateDependentProof<EthereumMachine>>
|
||||
_checker: Arc<StateDependentProof>
|
||||
) -> Self::Transition;
|
||||
}
|
||||
|
||||
@@ -78,7 +77,7 @@ impl ChainDataFetcher for Unavailable {
|
||||
&self,
|
||||
_hash: H256,
|
||||
_engine: Arc<EthEngine>,
|
||||
_checker: Arc<StateDependentProof<EthereumMachine>>
|
||||
_checker: Arc<StateDependentProof>
|
||||
) -> Self::Transition {
|
||||
Err("fetching epoch transition proofs unavailable")
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ use std::sync::{Weak, Arc};
|
||||
|
||||
use ethcore::client::{ClientReport, EnvInfo, ClientIoMessage};
|
||||
use ethcore::engines::{epoch, EthEngine, EpochChange, EpochTransition, Proof};
|
||||
use ethcore::machine::EthereumMachine;
|
||||
use ethcore::error::{Error, EthcoreResult};
|
||||
use ethcore::verification::queue::{self, HeaderQueue};
|
||||
use ethcore::spec::{Spec, SpecHardcodedSync};
|
||||
@@ -468,7 +467,7 @@ impl<T: ChainDataFetcher> Client<T> {
|
||||
true
|
||||
}
|
||||
|
||||
fn check_epoch_signal(&self, verified_header: &Header) -> Result<Option<Proof<EthereumMachine>>, T::Error> {
|
||||
fn check_epoch_signal(&self, verified_header: &Header) -> Result<Option<Proof>, T::Error> {
|
||||
use ethcore::machine::{AuxiliaryRequest, AuxiliaryData};
|
||||
|
||||
let mut block: Option<Vec<u8>> = None;
|
||||
@@ -514,7 +513,7 @@ impl<T: ChainDataFetcher> Client<T> {
|
||||
}
|
||||
|
||||
// attempts to fetch the epoch proof from the network until successful.
|
||||
fn write_pending_proof(&self, header: &Header, proof: Proof<EthereumMachine>) -> Result<(), T::Error> {
|
||||
fn write_pending_proof(&self, header: &Header, proof: Proof) -> Result<(), T::Error> {
|
||||
let proof = match proof {
|
||||
Proof::Known(known) => known,
|
||||
Proof::WithState(state_dependent) => {
|
||||
|
||||
@@ -25,7 +25,6 @@ use common_types::encoded;
|
||||
use common_types::receipt::Receipt;
|
||||
use common_types::transaction::SignedTransaction;
|
||||
use ethcore::engines::{EthEngine, StateDependentProof};
|
||||
use ethcore::machine::EthereumMachine;
|
||||
use ethcore::state::{self, ProvedExecution};
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use ethtrie::{TrieError, TrieDB};
|
||||
@@ -1083,7 +1082,7 @@ pub struct Signal {
|
||||
/// Consensus engine, used to check the proof.
|
||||
pub engine: Arc<EthEngine>,
|
||||
/// Special checker for the proof.
|
||||
pub proof_check: Arc<StateDependentProof<EthereumMachine>>,
|
||||
pub proof_check: Arc<StateDependentProof>,
|
||||
}
|
||||
|
||||
impl Signal {
|
||||
|
||||
Reference in New Issue
Block a user