add freeze_lock() and fix par_process_entries() failure to detect self conflict (#4415)
* add freeze_lock and fix par_process_entries failure to detect self conflict * fixup * fixup
This commit is contained in:
@@ -31,7 +31,7 @@ use solana_sdk::transaction::{Result, Transaction, TransactionError};
|
||||
use std::borrow::Borrow;
|
||||
use std::cmp;
|
||||
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::{Arc, RwLock, RwLockReadGuard};
|
||||
use std::time::Instant;
|
||||
|
||||
type BankStatusCache = StatusCache<Result<()>>;
|
||||
@@ -191,6 +191,10 @@ impl Bank {
|
||||
self.slot
|
||||
}
|
||||
|
||||
pub fn freeze_lock(&self) -> RwLockReadGuard<Hash> {
|
||||
self.hash.read().unwrap()
|
||||
}
|
||||
|
||||
pub fn hash(&self) -> Hash {
|
||||
*self.hash.read().unwrap()
|
||||
}
|
||||
|
Reference in New Issue
Block a user