Refactor accounts.rs with Justin's comments to improve lock accounts (#21406)
with results code path. - fix a bug that could unlock accounts that weren't locked - add test to the refactored function - skip enumerating transaction accounts if qos results is an error - add #[must_use] annotation - avoid clone error in results - add qos error code to unlock_accounts match statement - remove unnecessary AbiExample
This commit is contained in:
@@ -24,6 +24,10 @@ use {
|
||||
};
|
||||
|
||||
pub struct QosService {
|
||||
// cost_model instance is owned by validator, shared between replay_stage and
|
||||
// banking_stage. replay_stage writes the latest on-chain program timings to
|
||||
// it; banking_stage's qos_service reads that information to calculate
|
||||
// transaction cost, hence RwLock wrapped.
|
||||
cost_model: Arc<RwLock<CostModel>>,
|
||||
metrics: Arc<QosServiceMetrics>,
|
||||
reporting_thread: Option<JoinHandle<()>>,
|
||||
|
Reference in New Issue
Block a user