Revive the parallel bank client from v0.16 (#6903)
This commit is contained in:
parent
71bf8c5f85
commit
986e9e268e
|
@ -239,7 +239,11 @@ impl SyncClient for BankClient {
|
|||
impl BankClient {
|
||||
fn run(bank: &Bank, transaction_receiver: Receiver<Transaction>) {
|
||||
while let Ok(tx) = transaction_receiver.recv() {
|
||||
let _ = bank.process_transaction(&tx);
|
||||
let mut transactions = vec![tx];
|
||||
while let Ok(tx) = transaction_receiver.try_recv() {
|
||||
transactions.push(tx);
|
||||
}
|
||||
let _ = bank.process_transactions(&transactions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue