Add erroring tx to unexpected validator error logging (#4314)

* Add tx logging to error

* Add tx logging to unexpected validator errors
This commit is contained in:
carllin 2019-05-16 14:59:22 -07:00 committed by GitHub
parent 7bfb60f82e
commit b3e45fd6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -36,16 +36,16 @@ fn par_execute_entries(
MAX_RECENT_BLOCKHASHES, MAX_RECENT_BLOCKHASHES,
); );
let mut first_err = None; let mut first_err = None;
for r in results { for (r, tx) in results.iter().zip(e.transactions.iter()) {
if let Err(ref e) = r { if let Err(ref e) = r {
if first_err.is_none() { if first_err.is_none() {
first_err = Some(r.clone()); first_err = Some(r.clone());
} }
if !Bank::can_commit(&r) { if !Bank::can_commit(&r) {
warn!("Unexpected validator error: {:?}", e); warn!("Unexpected validator error: {:?}, tx: {:?}", e, tx);
datapoint!( datapoint!(
"validator_process_entry_error", "validator_process_entry_error",
("error", format!("{:?}", e), String) ("error", format!("error: {:?}, tx: {:?}", e, tx), String)
); );
} }
} }