Get transactions from LockedAccountsResults when possible (#5923)
This commit is contained in:
@@ -43,23 +43,22 @@ fn par_execute_entries(bank: &Bank, entries: &[(&Entry, LockedAccountsResults)])
|
||||
thread_pool.borrow().install(|| {
|
||||
entries
|
||||
.into_par_iter()
|
||||
.map(|(e, locked_accounts)| {
|
||||
.map(|(entry, locked_accounts)| {
|
||||
let results = bank.load_execute_and_commit_transactions(
|
||||
&e.transactions,
|
||||
locked_accounts,
|
||||
MAX_RECENT_BLOCKHASHES,
|
||||
);
|
||||
let mut first_err = None;
|
||||
for (r, tx) in results.iter().zip(e.transactions.iter()) {
|
||||
if let Err(ref e) = r {
|
||||
for (r, tx) in results.iter().zip(entry.transactions.iter()) {
|
||||
if let Err(ref entry) = r {
|
||||
if first_err.is_none() {
|
||||
first_err = Some(r.clone());
|
||||
}
|
||||
if !Bank::can_commit(&r) {
|
||||
warn!("Unexpected validator error: {:?}, tx: {:?}", e, tx);
|
||||
warn!("Unexpected validator error: {:?}, tx: {:?}", entry, tx);
|
||||
datapoint_error!(
|
||||
"validator_process_entry_error",
|
||||
("error", format!("error: {:?}, tx: {:?}", e, tx), String)
|
||||
("error", format!("error: {:?}, tx: {:?}", entry, tx), String)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user