Removing update_seal when new transactions arrives
This commit is contained in:
parent
7ae60056b2
commit
2dc314f993
@ -48,7 +48,7 @@ impl MinerService for TestMinerService {
|
||||
}
|
||||
|
||||
/// 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!(); }
|
||||
|
||||
/// Returns hashes of transactions currently in pending
|
||||
|
@ -950,11 +950,7 @@ impl ChainSync {
|
||||
nonce: chain.nonce(a),
|
||||
balance: chain.balance(a),
|
||||
};
|
||||
let res = 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());
|
||||
}
|
||||
let _ = self.miner.import_transactions(transactions, fetch_account);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user