Merge pull request #3796 from ethcore/tx-broadcast

Avoid broadcasting transactions to peers that send them
This commit is contained in:
Gav Wood
2016-12-12 04:13:56 +01:00
committed by GitHub
15 changed files with 119 additions and 72 deletions

View File

@@ -657,7 +657,7 @@ impl BlockChainClient for TestBlockChainClient {
unimplemented!();
}
fn queue_transactions(&self, transactions: Vec<Bytes>) {
fn queue_transactions(&self, transactions: Vec<Bytes>, _peer_id: usize) {
// import right here
let txs = transactions.into_iter().filter_map(|bytes| UntrustedRlp::new(&bytes).as_val().ok()).collect();
self.miner.import_external_transactions(self, txs);