entry_id -> entry
This commit is contained in:
@@ -393,7 +393,7 @@ impl Bank {
|
||||
txs.iter()
|
||||
.zip(lock_results.into_iter())
|
||||
.map(|(tx, lock_res)| {
|
||||
if lock_res.is_ok() && !hash_queue.check_entry_id_age(tx.last_id, max_age) {
|
||||
if lock_res.is_ok() && !hash_queue.check_entry_age(tx.last_id, max_age) {
|
||||
error_counters.reserve_last_id += 1;
|
||||
Err(BankError::LastIdNotFound)
|
||||
} else {
|
||||
@@ -594,7 +594,8 @@ impl Bank {
|
||||
#[must_use]
|
||||
pub fn process_transactions(&self, txs: &[Transaction]) -> Vec<Result<()>> {
|
||||
let lock_results = self.lock_accounts(txs);
|
||||
let results = self.load_execute_and_commit_transactions(txs, lock_results, MAX_RECENT_TICK_HASHES);
|
||||
let results =
|
||||
self.load_execute_and_commit_transactions(txs, lock_results, MAX_RECENT_TICK_HASHES);
|
||||
self.unlock_accounts(txs, &results);
|
||||
results
|
||||
}
|
||||
@@ -1200,8 +1201,11 @@ mod tests {
|
||||
let pay_alice = vec![tx1];
|
||||
|
||||
let lock_result = bank.lock_accounts(&pay_alice);
|
||||
let results_alice =
|
||||
bank.load_execute_and_commit_transactions(&pay_alice, lock_result, MAX_RECENT_TICK_HASHES);
|
||||
let results_alice = bank.load_execute_and_commit_transactions(
|
||||
&pay_alice,
|
||||
lock_result,
|
||||
MAX_RECENT_TICK_HASHES,
|
||||
);
|
||||
assert_eq!(results_alice[0], Ok(()));
|
||||
|
||||
// try executing an interleaved transfer twice
|
||||
|
Reference in New Issue
Block a user