Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

vm factory to mining client #1487

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,6 @@ impl BlockChainClient for Client {
ret
}

fn vm_factory(&self) -> &EvmFactory {
&self.vm_factory
}

fn block_header(&self, id: BlockID) -> Option<Bytes> {
Self::block_hash(&self.chain, id).and_then(|hash| self.chain.block(&hash).map(|bytes| BlockView::new(&bytes).rlp().at(0).as_raw().to_vec()))
Expand Down Expand Up @@ -829,6 +826,10 @@ impl MiningBlockChainClient for Client {

open_block
}

fn vm_factory(&self) -> &EvmFactory {
&self.vm_factory
}
}

impl MayPanic for Client {
Expand Down
6 changes: 3 additions & 3 deletions ethcore/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ pub trait BlockChainClient : Sync + Send {
// TODO: should be able to accept blockchain location for call.
fn call(&self, t: &SignedTransaction, analytics: CallAnalytics) -> Result<Executed, ExecutionError>;

/// Returns EvmFactory.
fn vm_factory(&self) -> &EvmFactory;

/// Returns traces matching given filter.
fn filter_traces(&self, filter: TraceFilter) -> Option<Vec<LocalizedTrace>>;

Expand Down Expand Up @@ -253,4 +250,7 @@ pub trait MiningBlockChainClient : BlockChainClient {
/// Returns OpenBlock prepared for closing.
fn prepare_open_block(&self, author: Address, gas_range_target: (U256, U256), extra_data: Bytes)
-> OpenBlock;

/// Returns EvmFactory.
fn vm_factory(&self) -> &EvmFactory;
}
8 changes: 4 additions & 4 deletions ethcore/src/client/test_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ impl MiningBlockChainClient for TestBlockChainClient {
fn prepare_open_block(&self, _author: Address, _gas_range_target: (U256, U256), _extra_data: Bytes) -> OpenBlock {
unimplemented!();
}

fn vm_factory(&self) -> &EvmFactory {
unimplemented!();
}
}

impl BlockChainClient for TestBlockChainClient {
Expand Down Expand Up @@ -463,10 +467,6 @@ impl BlockChainClient for TestBlockChainClient {
}
}

fn vm_factory(&self) -> &EvmFactory {
unimplemented!();
}

fn filter_traces(&self, _filter: TraceFilter) -> Option<Vec<LocalizedTrace>> {
unimplemented!();
}
Expand Down