pub fn process_transaction_with_preflight_and_commitment(
        &mut self,
        transaction: Transaction,
        commitment: CommitmentLevel,
    ) -> impl Future<Output = Result<(), BanksClientError>> + '_ {
        let mut ctx = context::current();
        ctx.deadline += Duration::from_secs(50);
        self.process_transaction_with_preflight_and_commitment_and_context(
            ctx,
            transaction,
            commitment,
        )
        .map(|result| match result? {
            BanksTransactionResultWithSimulation {
                result: None,
                simulation_details: _,
            } => Err(BanksClientError::ClientError(
                "invalid blockhash or fee-payer",
            )),
            BanksTransactionResultWithSimulation {
                result: Some(Err(err)),
                simulation_details: Some(simulation_details),
            } => Err(BanksClientError::SimulationError {
                err,
                logs: simulation_details.logs,
                units_consumed: simulation_details.units_consumed,
            }),
            BanksTransactionResultWithSimulation {
                result: Some(result),
                simulation_details: _,
            } => result.map_err(Into::into),
        })
    }
/// Send a transaction and return any preflight (sanitization or simulation) errors, or return
/// after the transaction has been rejected or reached the given level of commitment.
Send a transaction and return any preflight (sanitization or simulation) errors, or return
after the transaction has been rejected or reached the given level of commitment.
Send a transaction and return any preflight ( sanitization or simulation ) errors or return after the transaction has been rejected or reached the given level of commitment .
pub fn process_transaction_with_preflight_and_commitment(
        &mut self,
        transaction: Transaction,
        commitment: CommitmentLevel,
    ) -> impl Future<Output = Result<(), BanksClientError>> + '_ {
        let mut ctx = context::current();
        ctx.deadline += Duration::from_secs(50);
        self.process_transaction_with_preflight_and_commitment_and_context(
            ctx,
            transaction,
            commitment,
        )
        .map(|result| match result? {
            BanksTransactionResultWithSimulation {
                result: None,
                simulation_details: _,
            } => Err(BanksClientError::ClientError(
                "invalid blockhash or fee-payer",
            )),
            BanksTransactionResultWithSimulation {
                result: Some(Err(err)),
                simulation_details: Some(simulation_details),
            } => Err(BanksClientError::SimulationError {
                err,
                logs: simulation_details.logs,
                units_consumed: simulation_details.units_consumed,
            }),
            BanksTransactionResultWithSimulation {
                result: Some(result),
                simulation_details: _,
            } => result.map_err(Into::into),
        })
    }
pub fn process_transaction_with_preflight_and_commitment ( & mut self , transaction : Transaction , commitment : CommitmentLevel , ) -> impl Future < Output = Result < ( ) , BanksClientError > > + ' _ { let mut ctx = context :: current ( ) ; ctx . deadline += Duration :: from_secs ( 50 ) ; self . process_transaction_with_preflight_and_commitment_and_context ( ctx , transaction , commitment , ) . map ( | result | match result ? { BanksTransactionResultWithSimulation { result : None , simulation_details : _ , } => Err ( BanksClientError :: ClientError ( " " , ) ) , BanksTransactionResultWithSimulation { result : Some ( Err ( err ) ) , simulation_details : Some ( simulation_details ) , } => Err ( BanksClientError :: SimulationError { err , logs : simulation_details . logs , units_consumed : simulation_details . units_consumed , } ) , BanksTransactionResultWithSimulation { result : Some ( result ) , simulation_details : _ , } => result . map_err ( Into :: into ) , } ) }
Send a transaction and return any preflight (sanitization or simulation) errors, or return
after the transaction has been rejected or reached the given level of commitment.
Send a transaction and return any preflight ( sanitization or simulation ) errors or return after the transaction has been rejected or reached the given level of commitment .
&mut self
transaction
Transaction
commitment
CommitmentLevel