Removing update_seal when new transactions arrives

This commit is contained in:
Tomasz Drwięga 2016-03-17 17:19:46 +01:00
parent 7ae60056b2
commit 2dc314f993
2 changed files with 2 additions and 6 deletions

View File

@ -48,7 +48,7 @@ impl MinerService for TestMinerService {
} }
/// Imports transactions to transaction queue. /// Imports transactions to transaction queue.
fn import_transactions<T>(&self, _transactions: Vec<SignedTransaction>, _fetch_account: T) -> Result<(), Error> fn import_transactions<T>(&self, _transactions: Vec<SignedTransaction>, _fetch_account: T) -> Vec<Result<(), Error>>
where T: Fn(&Address) -> AccountDetails { unimplemented!(); } where T: Fn(&Address) -> AccountDetails { unimplemented!(); }
/// Returns hashes of transactions currently in pending /// Returns hashes of transactions currently in pending

View File

@ -950,11 +950,7 @@ impl ChainSync {
nonce: chain.nonce(a), nonce: chain.nonce(a),
balance: chain.balance(a), balance: chain.balance(a),
}; };
let res = self.miner.import_transactions(transactions, fetch_account); let _ = self.miner.import_transactions(transactions, fetch_account);
let any_transaction_imported = res.into_iter().any(|r| r.is_ok());
if any_transaction_imported {
self.miner.update_sealing(io.chain());
}
Ok(()) Ok(())
} }