Extract some parts of miner from ethcore. (#7353)

* Move miner away from ethcore.

* Fix ethcore to use miner/transaction.

* Fix tests and warnings.

* fixed incorrect merge of the test in the documentation
This commit is contained in:
Tomasz Drwięga
2018-01-11 17:49:10 +01:00
committed by Marek Kotewicz
parent 9a12945304
commit f044b61f42
74 changed files with 778 additions and 522 deletions

View File

@@ -440,7 +440,7 @@ impl ChainNotify for EthSync {
struct TxRelay(Arc<BlockChainClient>);
impl LightHandler for TxRelay {
fn on_transactions(&self, ctx: &EventContext, relay: &[::ethcore::transaction::UnverifiedTransaction]) {
fn on_transactions(&self, ctx: &EventContext, relay: &[::transaction::UnverifiedTransaction]) {
trace!(target: "pip", "Relaying {} transactions from peer {}", relay.len(), ctx.peer());
self.0.queue_transactions(relay.iter().map(|tx| ::rlp::encode(tx).into_vec()).collect(), ctx.peer())
}