Struct waffles_solana_core::qos_service::QosService
source · pub struct QosService { /* private fields */ }Implementations§
source§impl QosService
impl QosService
pub fn new(id: u32) -> Self
sourcepub fn select_and_accumulate_transaction_costs(
&self,
bank: &Bank,
transactions: &[SanitizedTransaction]
) -> (Vec<TransactionCost>, Vec<Result<()>>, usize)
pub fn select_and_accumulate_transaction_costs( &self, bank: &Bank, transactions: &[SanitizedTransaction] ) -> (Vec<TransactionCost>, Vec<Result<()>>, usize)
Calculate cost of transactions, determine which ones to include in the slot, and accumulate costs in the cost tracker. Returns a vector of transaction costs, a vector of results indicating which transactions were selected, and the number of transactions that were NOT selected.
sourcepub fn update_or_remove_transaction_costs<'a>(
transaction_costs: impl Iterator<Item = &'a TransactionCost>,
transaction_qos_results: impl Iterator<Item = &'a Result<()>>,
transaction_committed_status: Option<&Vec<CommitTransactionDetails>>,
bank: &Arc<Bank>
)
pub fn update_or_remove_transaction_costs<'a>( transaction_costs: impl Iterator<Item = &'a TransactionCost>, transaction_qos_results: impl Iterator<Item = &'a Result<()>>, transaction_committed_status: Option<&Vec<CommitTransactionDetails>>, bank: &Arc<Bank> )
Update the transaction cost in the cost_tracker with the real cost for transactions that were executed successfully; Otherwise remove the cost from the cost tracker, therefore preventing cost_tracker being inflated with unsuccessfully executed transactions.
pub fn report_metrics(&self, bank: Arc<Bank>)
pub fn accumulate_actual_execute_cu(&self, units: u64)
pub fn accumulate_actual_execute_time(&self, micro_sec: u64)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for QosService
impl Send for QosService
impl Sync for QosService
impl Unpin for QosService
impl !UnwindSafe for QosService
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Requestsource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request