Optimize Message::is_non_loader_key method (#18579)

This commit is contained in:
Justin Starry
2021-07-12 10:42:22 -05:00
committed by GitHub
parent 12aa238eb1
commit e806d31224
4 changed files with 25 additions and 51 deletions

View File

@ -201,7 +201,7 @@ pub fn write_transaction<W: io::Write>(
}
let mut fee_payer_index = None;
for (account_index, account) in message.account_keys.iter().enumerate() {
if fee_payer_index.is_none() && message.is_non_loader_key(account, account_index) {
if fee_payer_index.is_none() && message.is_non_loader_key(account_index) {
fee_payer_index = Some(account_index)
}
writeln!(