Fix mismatch between leader/validator bank votability (#3942)
* Fix mismatch between leader/validator bank votability
This commit is contained in:
@ -20,7 +20,7 @@ use solana_runtime::bank::Bank;
|
||||
use solana_runtime::locked_accounts_results::LockedAccountsResults;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::timing::{self, duration_as_us, DEFAULT_TICKS_PER_SLOT, MAX_RECENT_BLOCKHASHES};
|
||||
use solana_sdk::transaction::{self, Transaction, TransactionError};
|
||||
use solana_sdk::transaction::{self, Transaction};
|
||||
use std::cmp;
|
||||
use std::net::UdpSocket;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
@ -367,14 +367,10 @@ impl BankingStage {
|
||||
let processed_transactions: Vec<_> = results
|
||||
.iter()
|
||||
.zip(txs.iter())
|
||||
.filter_map(|(r, x)| match r {
|
||||
Ok(_) => Some(x.clone()),
|
||||
Err(TransactionError::InstructionError(index, err)) => {
|
||||
debug!("instruction error {:?}, {:?}", index, err);
|
||||
.filter_map(|(r, x)| {
|
||||
if Bank::can_commit(r) {
|
||||
Some(x.clone())
|
||||
}
|
||||
Err(ref e) => {
|
||||
debug!("process transaction failed {:?}", e);
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
@ -667,6 +663,7 @@ mod tests {
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_transaction;
|
||||
use solana_sdk::transaction::TransactionError;
|
||||
use std::sync::mpsc::channel;
|
||||
use std::thread::sleep;
|
||||
|
||||
|
Reference in New Issue
Block a user